From 70924af414b258c769a2ece2c64b7c9b14c18fc8 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 5 Jun 2006 11:46:46 -0300 Subject: Userspace compilation were broken by the changes at videodev. From: Mauro Carvalho Chehab Userspace have its own headers for timeval, so, include linux/time.h shouldn't be done at userspace. Signed-off-by: Mauro Carvalho Chehab --- linux/include/linux/videodev2.h | 2 ++ test/ioctl-test.c | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 8ed112a10..630ebfaca 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -14,7 +14,9 @@ */ #ifndef __LINUX_VIDEODEV2_H #define __LINUX_VIDEODEV2_H +#ifdef __KERNEL__ #include /* need struct timeval */ +#endif #include #include /* need __user */ diff --git a/test/ioctl-test.c b/test/ioctl-test.c index b7dd87e94..5050e2f52 100644 --- a/test/ioctl-test.c +++ b/test/ioctl-test.c @@ -23,7 +23,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define INTERNAL 1 /* meant for testing ioctl debug msgs */ +/* + * Internal ioctl doesn't work anymore, due to the changes at + * v4l2-dev.h. + */ +//#define INTERNAL 1 /* meant for testing ioctl debug msgs */ #include #include @@ -32,8 +36,8 @@ #include #include #include -#define __user -#include +//#define __user +#include "../linux/include/linux/videodev.h" #ifdef INTERNAL typedef __u8 u8; @@ -41,6 +45,8 @@ typedef __u32 u32; #include #include "../linux/include/media/v4l2-common.h" #include +#else +typedef u_int32_t u32; #endif /* All possible parameters used on v4l ioctls */ @@ -143,8 +149,8 @@ int ioctls[] = { VIDIOC_ENUMINPUT,/* struct v4l2_input */ VIDIOC_ENUMOUTPUT,/* struct v4l2_output */ VIDIOC_ENUMSTD,/* struct v4l2_standard */ - VIDIOC_G_AUDIO_OLD,/* struct v4l2_audio */ - VIDIOC_G_AUDOUT_OLD,/* struct v4l2_audioout */ +// VIDIOC_G_AUDIO_OLD,/* struct v4l2_audio */ +// VIDIOC_G_AUDOUT_OLD,/* struct v4l2_audioout */ VIDIOC_G_CROP,/* struct v4l2_crop */ VIDIOC_G_CTRL,/* struct v4l2_control */ VIDIOC_G_FMT,/* struct v4l2_format */ @@ -152,7 +158,7 @@ int ioctls[] = { VIDIOC_G_MODULATOR,/* struct v4l2_modulator */ VIDIOC_G_PARM,/* struct v4l2_streamparm */ VIDIOC_G_TUNER,/* struct v4l2_tuner */ - VIDIOC_OVERLAY_OLD,/* int */ +// VIDIOC_OVERLAY_OLD,/* int */ VIDIOC_QBUF,/* struct v4l2_buffer */ VIDIOC_QUERYBUF,/* struct v4l2_buffer */ VIDIOC_QUERYCTRL,/* struct v4l2_queryctrl */ -- cgit v1.2.3