lkml.org 
[lkml]   [2009]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: Confusion in usr/include/linux/videodev.h
    Date
    On Wednesday 21 January 2009, Jaswinder Singh Rajput wrote:

    > > diff -r 29c5787efcda linux/include/linux/videodev.h
    > > --- a/linux/include/linux/videodev.h Thu Jan 15 09:07:03 2009 -0800
    > > +++ b/linux/include/linux/videodev.h Wed Jan 21 00:51:45 2009 -0800
    > > @@ -15,7 +15,8 @@
    > > #include <linux/ioctl.h>
    > > #include <linux/videodev2.h>
    > >
    > > -#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__)
    > > +#if (defined(__KERNEL__) && defined(CONFIG_VIDEO_V4L1_COMPAT)) \
    > > + || !defined (__KERNEL__)
    > >
    > > #define VID_TYPE_CAPTURE 1 /* Can capture */
    > > #define VID_TYPE_TUNER 2 /* Can tune */
    > >
    > > Now CONFIG_VIDEO_V4L1_COMPAT will only be used in the kernel.
    > >
    >
    > No, this will still give warnings.

    You could #define another conditional, like this:

    #ifndef __KERNEL__
    # define __V4L1_COMPAT_API /* Always provide definitions to user space */
    #else /* __KERNEL__ */
    # ifdef CONFIG_VIDEO_V4L1_COMPAT
    # define __V4L1_COMPAT_API
    # endif /* CONFIG_VIDEO_V4L1_COMPAT /*
    #endif /* __KERNEL__ */

    Arnd <><


    \
     
     \ /
      Last update: 2009-01-21 10:13    [W:0.023 / U:123.216 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site