2006-05-25 04:14:16

by David Mosberger-Tang

[permalink] [raw]
Subject: trivial videodev2.h patch

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/


Attachments:
(No filename) (549.00 B)
videodev2.diff (287.00 B)
Download all attachments

2006-05-25 10:03:07

by Christian Kujau

[permalink] [raw]
Subject: Re: trivial videodev2.h patch

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

2006-05-26 13:31:56

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: trivial videodev2.h patch

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.