I'm getting the following compile error on a simple program that I'm
writing:
[root@DADE v4l]# gcc test.c -o t
In file included from videodev2.h:16,
from test.c:16:
/usr/include/linux/time.h:9: redefinition of `struct timespec'
/usr/include/linux/time.h:17: redefinition of `struct timeval'
Here's the source:
#include <stdio.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include "videodev2.h"
int main (void)
{
int status;
struct v4l2_capability cap;
int vcc = open("/dev/video0",O_RDWR);
if (vcc < 0) printf("Didn't Open!!!");
else
{
printf("Video device was opened \n");
status = ioctl(vcc, VIDIOC_QUERYCAP, &cap);
printf ("Version: %u.%u.%u\n", (cap.version >> 16) & 0xFF,(cap.version
>> 8) & 0xFF,cap.version & 0xFF);
printf("Done \n");
close(vcc);
}
}
_________________________________________________________________
ninemsn Extra Storage is now available. 30MB of storage on ninemsn Groups -
great for sharing photos and documents. Go to
http://join.msn.com/?page=dept/home&pgmarket=en-au