This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: libv4l2: prefix HAVE_POSIX_IOCTL with LIBV4L_ for public header Author: Leo Izen <[email protected]> Date: Thu Jun 5 08:56:51 2025 -0400 Commit fd882f9e77b13cbc6a669e6836c3943393b44152 introduced the flag HAVE_POSIX_IOCTL to change which v4l2_ioctl function is declared in libv4l2.h, but this is a public header and may conflict with another project which may use HAVE_POSIX_IOCTL on its own to determine which ioctl funtion it should declare. This commit namespaces the flag so it can't conflict with another project's configuration. Notably, if it uses #if instead of #ifdef and defines HAVE_POSIX_IOCTL to be 0, then it will create an incompatible function signature between v4l2_ioctl and the project's. Signed-off-by: Leo Izen <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> lib/include/libv4l2.h | 2 +- lib/libv4l1/v4l1compat.c | 2 +- lib/libv4l2/libv4l2.c | 2 +- lib/libv4l2/v4l2convert.c | 2 +- meson.build | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=c655bd2748169b55960dd7900510482d78cf6ec5 diff --git a/lib/include/libv4l2.h b/lib/include/libv4l2.h index 16565555dba9..25ababc78fd6 100644 --- a/lib/include/libv4l2.h +++ b/lib/include/libv4l2.h @@ -63,7 +63,7 @@ LIBV4L_PUBLIC extern FILE *v4l2_log_file; LIBV4L_PUBLIC int v4l2_open(const char *file, int oflag, ...); LIBV4L_PUBLIC int v4l2_close(int fd); LIBV4L_PUBLIC int v4l2_dup(int fd); -#ifdef HAVE_POSIX_IOCTL +#ifdef LIBV4L_HAVE_POSIX_IOCTL LIBV4L_PUBLIC int v4l2_ioctl(int fd, int request, ...); #else LIBV4L_PUBLIC int v4l2_ioctl(int fd, unsigned long int request, ...); diff --git a/lib/libv4l1/v4l1compat.c b/lib/libv4l1/v4l1compat.c index 2db6842347cd..c4ca3a70cb8f 100644 --- a/lib/libv4l1/v4l1compat.c +++ b/lib/libv4l1/v4l1compat.c @@ -90,7 +90,7 @@ LIBV4L_PUBLIC int dup(int fd) return v4l1_dup(fd); } -#ifdef HAVE_POSIX_IOCTL +#ifdef LIBV4L_HAVE_POSIX_IOCTL LIBV4L_PUBLIC int ioctl(int fd, int request, ...) #else LIBV4L_PUBLIC int ioctl(int fd, unsigned long int request, ...) diff --git a/lib/libv4l2/libv4l2.c b/lib/libv4l2/libv4l2.c index 1607ec353268..289501d96c26 100644 --- a/lib/libv4l2/libv4l2.c +++ b/lib/libv4l2/libv4l2.c @@ -1051,7 +1051,7 @@ static int v4l2_s_fmt(int index, struct v4l2_format *dest_fmt) return 0; } -#ifdef HAVE_POSIX_IOCTL +#ifdef LIBV4L_HAVE_POSIX_IOCTL int v4l2_ioctl(int fd, int request, ...) #else int v4l2_ioctl(int fd, unsigned long int request, ...) diff --git a/lib/libv4l2/v4l2convert.c b/lib/libv4l2/v4l2convert.c index 396ed3ea3e88..b33472e5c4db 100644 --- a/lib/libv4l2/v4l2convert.c +++ b/lib/libv4l2/v4l2convert.c @@ -123,7 +123,7 @@ LIBV4L_PUBLIC int dup(int fd) return v4l2_dup(fd); } -#ifdef HAVE_POSIX_IOCTL +#ifdef LIBV4L_HAVE_POSIX_IOCTL LIBV4L_PUBLIC int ioctl(int fd, int request, ...) #else LIBV4L_PUBLIC int ioctl(int fd, unsigned long int request, ...) diff --git a/meson.build b/meson.build index 62d271b4c872..2cca95d0d588 100644 --- a/meson.build +++ b/meson.build @@ -388,7 +388,7 @@ ioctl_posix_test = ''' int ioctl (int, int, ...); ''' if cc.compiles(ioctl_posix_test) - conf.set('HAVE_POSIX_IOCTL', 1) + conf.set('LIBV4L_HAVE_POSIX_IOCTL', 1) endif c_arguments = []
