From b97dec9502c40ae479dcf9db05c16acdd4ea266d Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 20 Aug 2021 21:13:44 +0200 Subject: [PATCH] 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 --- include/sound/asound.h | 9 +-------- 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 -#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 -- 2.47.3