public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* trivial videodev2.h patch
@ 2006-05-25  4:14 David Mosberger-Tang
  2006-05-25 10:03 ` Christian Kujau
  0 siblings, 1 reply; 3+ messages in thread
From: David Mosberger-Tang @ 2006-05-25  4:14 UTC (permalink / raw)
  To: Andrew Morton, linux kernel

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

Hi Andrew,

linux/videodev2.h uses types such as __u8 but it fails to include
<linux/types.h>.  Within the kernel, that's not a problem because
<linux/time.h> already includes <linux/types.h>.  However, there are
user apps that try to include videodev2.h (e.g., ekiga) and at least
on ia64, it causes compilation failures since <linux/types.h> doesn't
get included for any other reason, leaving __u8 etc. undefined.  The
attached patch fixes the problem for me.

Thanks,

  --david
-- 
Mosberger Consulting LLC, http://www.mosberger-consulting.com/

[-- Attachment #2: videodev2.diff --]
[-- Type: text/x-patch, Size: 287 bytes --]

diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -19,6 +19,7 @@
 #include <linux/device.h>
 #include <linux/mutex.h>
 #endif
+#include <linux/types.h>
 #include <linux/compiler.h> /* need __user */
 
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: trivial videodev2.h patch
  2006-05-25  4:14 trivial videodev2.h patch David Mosberger-Tang
@ 2006-05-25 10:03 ` Christian Kujau
  2006-05-26 13:31   ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Kujau @ 2006-05-25 10:03 UTC (permalink / raw)
  To: David Mosberger-Tang; +Cc: linux kernel

On Wed, 24 May 2006, David Mosberger-Tang wrote:
> linux/videodev2.h uses types such as __u8 but it fails to include
> <linux/types.h>.  Within the kernel, that's not a problem because
> <linux/time.h> already includes <linux/types.h>.  However, there are
> user apps that try to include videodev2.h (e.g., ekiga) and at least

userspace apps should (must?) not include kernel headers, AFAIK.
there is lots of discussion regarding this in the lkml archives...

Christian.
-- 
BOFH excuse #435:

Internet shut down due to maintenance

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: trivial videodev2.h patch
  2006-05-25 10:03 ` Christian Kujau
@ 2006-05-26 13:31   ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2006-05-26 13:31 UTC (permalink / raw)
  To: Christian Kujau; +Cc: David Mosberger-Tang, linux kernel

Hi Christian,

Em Qui, 2006-05-25 às 11:03 +0100, Christian Kujau escreveu:
> On Wed, 24 May 2006, David Mosberger-Tang wrote:
> > linux/videodev2.h uses types such as __u8 but it fails to include
> > <linux/types.h>.  Within the kernel, that's not a problem because
> > <linux/time.h> already includes <linux/types.h>.  However, there are
> > user apps that try to include videodev2.h (e.g., ekiga) and at least
> 
> userspace apps should (must?) not include kernel headers, AFAIK.
> there is lots of discussion regarding this in the lkml archives...
In fact, this videodev2.h header is meant to describe the public API for
V4L2. The current version have several kernel-specific stuff (under
__KERNEL define), but we are already working on cleaning those stuff. 

Currently, on V4L, all kernel-specific stuff are under include/media,
while the public stuff are under include/linux. 
> 
> Christian.
Cheers, 
Mauro.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-05-26 13:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-25  4:14 trivial videodev2.h patch David Mosberger-Tang
2006-05-25 10:03 ` Christian Kujau
2006-05-26 13:31   ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox