diff options
author | Jaroslav Kysela <perex@perex.cz> | 2021-08-20 21:13:44 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2021-08-20 21:15:01 +0200 |
commit | b97dec9502c40ae479dcf9db05c16acdd4ea266d (patch) | |
tree | e369ca335adba817c896da528a6da65eb6ccc696 /include | |
parent | 868ecd509deb05938107faf66577c69e1702d6f3 (diff) | |
download | alsa-lib-b97dec9502c40ae479dcf9db05c16acdd4ea266d.tar.gz |
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 <perex@perex.cz>
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/asound.h | 9 | ||||
-rw-r--r-- | include/sound/type_compat.h | 4 |
2 files changed, 5 insertions, 8 deletions
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 <linux/types.h> -#else -#include <sys/types.h> -#endif -#ifndef __kernel_long_t -#define __kernel_long_t long -#endif +#include <alsa/sound/type_compat.h> #include <alsa/sound/uapi/asound.h> 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 |