NetBSD video(4) support, patch 3 of 3

xioctl() assumes that ioctl takes int request. Cope with
  int ioctl(int d, unsigned long request, ...)
to avoid "invalid argument".
This commit is contained in:
Patrick Welche
2012-09-17 14:46:54 +02:00
committed by Andrey Kamaev
parent 681ffd9a21
commit 1a84bcc565
4 changed files with 18 additions and 4 deletions

View File

@@ -346,7 +346,11 @@ static int numCameras = 0;
static int indexList = 0;
// IOCTL handling for V4L2
#ifdef HAVE_IOCTL_ULONG
static int xioctl( int fd, unsigned long request, void *arg)
#else
static int xioctl( int fd, int request, void *arg)
#endif
{
int r;

View File

@@ -354,17 +354,18 @@ static int icvSetVideoSize( CvCaptureCAM_V4L* capture, int w, int h);
static int numCameras = 0;
static int indexList = 0;
#ifdef HAVE_IOCTL_ULONG
static int xioctl( int fd, unsigned long request, void *arg)
#else
static int xioctl( int fd, int request, void *arg)
#endif
{
int r;
do r = ioctl (fd, request, arg);
while (-1 == r && EINTR == errno);
return r;
}
/* Simple test program: Find number of Video Sources available.