]> git.alsa-project.org Git - alsa-lib.git/commitdiff
header: Fix build error with old kernel headers
authorTakashi Iwai <tiwai@suse.de>
Wed, 6 May 2020 20:40:16 +0000 (22:40 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 6 May 2020 20:40:16 +0000 (22:40 +0200)
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

index 3be4d850a073b7e47d357917afacaa79b5c71d34..89dd7d2f61b852c82cb236f3b9f26411e574f614 100644 (file)
@@ -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>