From: GOTO Masanori <gotom@debian.or.jp>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: gotom@debian.or.jp
Subject: [PATCH] don't export videodev.h internal structure to userland
Date: Tue, 04 Nov 2003 14:17:12 +0900 [thread overview]
Message-ID: <80llqw90h3.wl@oris.opensource.jp> (raw)
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/
reply other threads:[~2003-11-04 5:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80llqw90h3.wl@oris.opensource.jp \
--to=gotom@debian.or.jp \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).