Message ID | 20200506204229.27311-1-tiwai@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [alsa-lib] header: Fix build error with old kernel headers | expand |
diff --git a/include/sound/asound.h b/include/sound/asound.h index 3be4d850a073..89dd7d2f61b8 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h @@ -1 +1,11 @@ +/* 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/uapi/asound.h>
Old development environment doesn't necessarily contain the headers defining __kernel_long_t that is recently used for y2038 timespec conditional. Define it explicitly in such a case. Signed-off-by: Takashi Iwai <tiwai@suse.de> --- include/sound/asound.h | 10 ++++++++++ 1 file changed, 10 insertions(+)