diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2024-08-29 15:40:00 +0200 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2024-09-01 18:01:43 +0200 |
commit | 00b64fca55a3a009c9d0e391c85f4fd3291e5d12 (patch) | |
tree | 1ecc0c46612fff43b6ca14fa576bc59792bf361e | |
parent | 6aafe61285404022b1e8e882b8a875bc33a93aec (diff) | |
download | ffmpeg-00b64fca55a3a009c9d0e391c85f4fd3291e5d12.tar.gz |
configure: improve check for POSIX ioctl
Instead of relying on system #ifdefs which may or may not be correct,
detect the POSIX ioctl signature at configure time.
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | libavdevice/v4l2.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -2524,6 +2524,7 @@ HAVE_LIST=" opencl_videotoolbox perl pod2man + posix_ioctl texi2html xmllint zlib_gzip @@ -7166,6 +7167,7 @@ xmllint --version > /dev/null 2>&1 && enable xmllint || disable xmllint check_headers linux/fb.h check_headers linux/videodev2.h test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete +test_code cc sys/ioctl.h "int ioctl(int, int, ...)" && enable posix_ioctl # check V4L2 codecs available in the API if enabled v4l2_m2m; then diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index 42d4b97c8f..0ae6872338 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -111,7 +111,7 @@ struct video_data { int (*open_f)(const char *file, int oflag, ...); int (*close_f)(int fd); int (*dup_f)(int fd); -#if defined(__sun) || defined(__BIONIC__) || defined(__musl__) /* POSIX-like */ +#if HAVE_POSIX_IOCTL int (*ioctl_f)(int fd, int request, ...); #else int (*ioctl_f)(int fd, unsigned long int request, ...); |