summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@users.sourceforge.net>2003-11-09 02:05:34 +0000
committerBastien Nocera <hadess@users.sourceforge.net>2003-11-09 02:05:34 +0000
commitf1bc0edef6826f7f012cae0c47d8fe766354d06f (patch)
tree5e2a03edf434ba6b2fd855d3bba8eedc4651c299
parent7b493df8fe27a1664fa88d6cdac65e1e0a1225b2 (diff)
downloadxine-lib-f1bc0edef6826f7f012cae0c47d8fe766354d06f.tar.gz
xine-lib-f1bc0edef6826f7f012cae0c47d8fe766354d06f.tar.bz2
- fix build on Debian unstable, those dummies seem to have put the Linux 2.6
headers in place of the 2.4 ones in glibc... CVS patchset: 5713 CVS date: 2003/11/09 02:05:34
-rw-r--r--src/input/input_v4l.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c
index 25190d7c3..23b559170 100644
--- a/src/input/input_v4l.c
+++ b/src/input/input_v4l.c
@@ -33,6 +33,22 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+
+/* From GStreamer's v4l plugin:
+ * Because of some really cool feature in video4linux1, also known as
+ * 'not including sys/types.h and sys/time.h', we had to include it
+ * ourselves. In all their intelligence, these people decided to fix
+ * this in the next version (video4linux2) in such a cool way that it
+ * breaks all compilations of old stuff...
+ * The real problem is actually that linux/time.h doesn't use proper
+ * macro checks before defining types like struct timeval. The proper
+ * fix here is to either fuck the kernel header (which is what we do
+ * by defining _LINUX_TIME_H, an innocent little hack) or by fixing it
+ * upstream, which I'll consider doing later on. If you get compiler
+ * errors here, check your linux/time.h && sys/time.h header setup.
+*/
+#define _LINUX_TIME_H
+
#include <linux/videodev.h>
#include <sys/ioctl.h>
#include <sys/mman.h>