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>
This commit is contained in:
Jaroslav Kysela 2021-08-20 21:13:44 +02:00
parent 868ecd509d
commit b97dec9502
2 changed files with 5 additions and 8 deletions

View 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>

View 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