aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDima Krasner <dima@dimakrasner.com>2016-03-05 19:50:02 +0200
committerDima Krasner <dima@dimakrasner.com>2016-03-05 19:50:02 +0200
commit696c448f8a6fdf3d56733e69ca8d7ddd04c908de (patch)
tree50e3bc0c9f6459e68356e704a6453f4d168ed239
parent9bad3fa00f3080906566c6b3acd14513d1ae4afd (diff)
include time.h, to prevent use of struct timespec before definition
In some old (2.6.32.x) kernel headers, asound.h does not include linux time.h when __KERNEL__ is undefined, which may break userspace. The build failures caused by this are similar to those fixed by c8333f8c. Signed-off-by: Dima Krasner <dima@dimakrasner.com>
-rw-r--r--mixer.c1
-rw-r--r--pcm.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/mixer.c b/mixer.c
index 7c5c5dc..9dd6e68 100644
--- a/mixer.c
+++ b/mixer.c
@@ -34,6 +34,7 @@
#include <errno.h>
#include <ctype.h>
#include <limits.h>
+#include <time.h>
#include <sys/ioctl.h>
diff --git a/pcm.c b/pcm.c
index 2c1308d..20bb7f0 100644
--- a/pcm.c
+++ b/pcm.c
@@ -38,6 +38,7 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/time.h>
+#include <time.h>
#include <limits.h>
#include <linux/ioctl.h>