mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-07-21 18:26:24 +00:00
Add FreeBSD variant of the ioctl request check.
This commit is contained in:
parent
65aea7c05a
commit
35c9de34e8
|
@ -1741,7 +1741,11 @@ static int v4l2_ioctl(int fd, unsigned long int request, void *arg)
|
||||||
if ((file = find_file(fd)) == NULL)
|
if ((file = find_file(fd)) == NULL)
|
||||||
return globals.old_fops.ioctl(fd, request, arg);
|
return globals.old_fops.ioctl(fd, request, arg);
|
||||||
|
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
if (arg == NULL && (request & IOC_DIRMASK != IOC_VOID)) {
|
||||||
|
#else
|
||||||
if (arg == NULL && (_IOC_DIR(request) & (_IOC_WRITE | _IOC_READ))) {
|
if (arg == NULL && (_IOC_DIR(request) & (_IOC_WRITE | _IOC_READ))) {
|
||||||
|
#endif
|
||||||
res = -EFAULT;
|
res = -EFAULT;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue