* [PATCH] don't export videodev.h internal structure to userland
@ 2003-11-04 5:17 GOTO Masanori
0 siblings, 0 replies; only message in thread
From: GOTO Masanori @ 2003-11-04 5:17 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: gotom
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/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-11-04 5:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-04 5:17 [PATCH] don't export videodev.h internal structure to userland GOTO Masanori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).