]> git.alsa-project.org Git - alsa-lib.git/commitdiff
asound.h: fix the __packed use for the out-of-kernel code
authorJaroslav Kysela <perex@perex.cz>
Fri, 20 Aug 2021 19:13:44 +0000 (21:13 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 20 Aug 2021 19:15:01 +0000 (21:15 +0200)
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>
include/sound/asound.h
include/sound/type_compat.h

index 89dd7d2f61b852c82cb236f3b9f26411e574f614..22e97d9be1d1d33609db7242424c0d44f1999223 100644 (file)
@@ -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>
index 5b765f447e2ef40cf05db6674b26c7c10bff404f..953ce566da6ea645ec9149fca374a24c1f168b82 100644 (file)
@@ -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