Skip to contentSkip to conversation

header: Fix build error with old kernel headers

PATCH New Takashi Iwai 1 participant 1 message May 6, 2020 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 header: Fix build error with old kernel headers

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.

---
 include/sound/asound.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
include/sound/asound.h +10 -0
index 3be4d850a073..89dd7d2f61b8 100644
@@ -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>
Signature · 1 line
2.16.4