File: videodev2-timeval.patch

package info (click to toggle)
linux-kernel-headers 2.5.999-test7-bk-17
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 28,268 kB
  • ctags: 214,024
  • sloc: ansic: 324,929; cpp: 783; makefile: 79; asm: 61; sh: 61
file content (19 lines) | stat: -rw-r--r-- 662 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
videodev2.h is needed in userspace by Video4Linux programs. 
linux/time.h has a definition of 'struct timeval' which conflicts with the
one in time.h, even though it has the same fields with types of the same
lengths.  So just use the userspace one in userspace!

--- include/linux/videodev2.h.orig	2003-10-15 11:13:17.000000000 -0400
+++ include/linux/videodev2.h	2003-11-20 21:11:02.000000000 -0500
@@ -13,7 +13,11 @@
  *		Justin Schoeman
  *		et al.
  */
+#ifdef __KERNEL__
 #include <linux/time.h> /* need struct timeval */
+#else /* not __KERNEL__ */
+#include <time.h> /* need struct timeval */
+#endif /* __KERNEL__ */
 
 /*
  *	M I S C E L L A N E O U S