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:

committed by
Andrey Kamaev

parent
681ffd9a21
commit
1a84bcc565
@@ -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;
|
||||
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user