[PATCH] don't export videodev.h internal structure to userland
From: GOTO Masanori <gotom@debian.or.jp>
Date: 2003-11-04 05:17:16
Hi,
This patch fixes not to compile with linux/videodev.h:
> cat v.c
#include <linux/videodev.h>
int main() {}
> gcc v.c
In file included from /usr/include/linux/device.h:17,
from /usr/include/linux/videodev.h:6,
from /tmp/v.c:1:
/usr/include/linux/list.h:576:2: warning: #warning "don't include kernel headers in
userspace"
In file included from /usr/include/linux/device.h:18,
from /usr/include/linux/videodev.h:6,
from /tmp/v.c:1:
/usr/include/linux/spinlock.h: In function `bit_spin_lock':
/usr/include/linux/spinlock.h:413: error: invalid type argument of `->'
...
This problem is occured by including device.h outside of __KERNEL__,
so I move the place of this header inclusion. This and previous patch
is for kernel 2.6.0-test9.
Please apply it.
Regards,
-- gotom
--- include/linux/videodev.h 2003-11-04 14:04:49.000000000 +0900
+++ include/linux/videodev.h 2003-11-04 14:04:04.000000000 +0900@@ -3,13 +3,13 @@ #include <linux/types.h> #include <linux/version.h> -#include <linux/device.h> #define HAVE_V4L2 1 #include <linux/videodev2.h> #ifdef __KERNEL__ +#include <linux/device.h> #include <linux/poll.h> #include <linux/mm.h> -------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/