[FFmpeg-cvslog] lavd/v4l2: Use proper field type for second parameter of ioctl() with BSD's

Brad Smith git at videolan.org
Sun May 19 02:32:25 EEST 2024


ffmpeg | branch: release/6.1 | Brad Smith <brad-at-comstyle.com at ffmpeg.org> | Sun May  5 23:59:47 2024 -0400| [ebb406db7c7b1fff5223d824fa3bbe3cd1402685] | committer: Brad Smith

lavd/v4l2: Use proper field type for second parameter of ioctl() with BSD's

The proper type was used until 73251678c83cbe24d08264da693411b166239bc7.

This covers all of the OS's that currently have V4L2 support, permutations
of Linux glibc/musl, Android bionic, FreeBSD, NetBSD, OpenBSD, Solaris.

Copied from FreeBSD ports patch.

Signed-off-by: Brad Smith <brad at comstyle.com>
Signed-off-by: Marton Balint <cus at passwd.hu>
(cherry picked from commit 9e674b31606c805dd31b4bb754364a72a5877238)
Signed-off-by: Brad Smith <brad at comstyle.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ebb406db7c7b1fff5223d824fa3bbe3cd1402685
---

 libavdevice/v4l2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 5e85d1a2b3..33bd26ead9 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -107,10 +107,10 @@ struct video_data {
     int (*open_f)(const char *file, int oflag, ...);
     int (*close_f)(int fd);
     int (*dup_f)(int fd);
-#ifdef __GLIBC__
-    int (*ioctl_f)(int fd, unsigned long int request, ...);
-#else
+#if defined(__sun) || defined(__BIONIC__) || defined(__musl__) /* POSIX-like */
     int (*ioctl_f)(int fd, int request, ...);
+#else
+    int (*ioctl_f)(int fd, unsigned long int request, ...);
 #endif
     ssize_t (*read_f)(int fd, void *buffer, size_t n);
     void *(*mmap_f)(void *start, size_t length, int prot, int flags, int fd, int64_t offset);



More information about the ffmpeg-cvslog mailing list