From: Jaroslav Kysela Date: Fri, 20 Aug 2021 19:13:44 +0000 (+0200) Subject: asound.h: fix the __packed use for the out-of-kernel code X-Git-Tag: v1.2.6~34 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=b97dec9502c40ae479dcf9db05c16acdd4ea266d;p=alsa-lib.git asound.h: fix the __packed use for the out-of-kernel code Also, move __kernel_long_t to type_compat.h for the consistency. Fixes: https://github.com/alsa-project/alsa-lib/issues/171 Signed-off-by: Jaroslav Kysela --- diff --git a/include/sound/asound.h b/include/sound/asound.h index 89dd7d2f..22e97d9b 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h @@ -1,11 +1,4 @@ /* workaround for building with old glibc / kernel headers */ -#ifdef __linux__ -#include -#else -#include -#endif -#ifndef __kernel_long_t -#define __kernel_long_t long -#endif +#include #include diff --git a/include/sound/type_compat.h b/include/sound/type_compat.h index 5b765f44..953ce566 100644 --- a/include/sound/type_compat.h +++ b/include/sound/type_compat.h @@ -44,6 +44,10 @@ typedef int64_t __s64; #define __be8 __u8 #endif +#ifndef __kernel_long_t +#define __kernel_long_t long +#endif + #ifndef __user #define __user #endif