Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (cdfac4375155ed8a69f4c18ec37300f9bcffc047)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (cdfac4375155ed8a69f4c18ec37300f9bcffc047)
  • Date: Sat, 28 Dec 2024 19:27:02 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

video/v4l-utils/DETAILS
| 2
video/v4l-utils/HISTORY
| 6 +
video/v4l-utils/patches/0001-v4l2-tracer-Define-_LARGEFILE64_SOURCE.patch
| 2
video/v4l-utils/patches/0002-qv4l2-Use-fcntl.h-instead-of-sys-fcntl.h.patch
| 2
video/v4l-utils/patches/0003-meson-Add-support-for-libexecinfo.patch
| 2

video/v4l-utils/patches/0004-libv4l2-Guard-the-v4l2_ioctl-function-with-HAVE_POSI.patch
| 58 ++++++++++
video/v4l-utils/patches/0005-libv4l1-Apply-HAVE_POSIX_IOCTL.patch
| 47 ++++++++
7 files changed, 115 insertions(+), 4 deletions(-)

New commits:
commit cdfac4375155ed8a69f4c18ec37300f9bcffc047
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

v4l-utils: Fix ioctl prototypes for POSIX-compliant systems

diff --git a/video/v4l-utils/DETAILS b/video/v4l-utils/DETAILS
index a909d5b..e1cc94d 100755
--- a/video/v4l-utils/DETAILS
+++ b/video/v4l-utils/DETAILS
@@ -1,7 +1,7 @@
source $GRIMOIRE/MESON_FUNCTIONS
SPELL=v4l-utils
VERSION=1.28.1
- PATCHLEVEL=1
+ PATCHLEVEL=2
SOURCE=$SPELL-$VERSION.tar.xz
SOURCE_URL[0]=https://linuxtv.org/downloads/$SPELL/$SOURCE
SOURCE2=$SOURCE.asc
diff --git a/video/v4l-utils/HISTORY b/video/v4l-utils/HISTORY
index 06b2f20..86feaeb 100644
--- a/video/v4l-utils/HISTORY
+++ b/video/v4l-utils/HISTORY
@@ -1,3 +1,9 @@
+2024-12-28 Ismael Luceno <ismael AT sourcemage.org>
+ *
patches/0004-libv4l2-Guard-the-v4l2_ioctl-function-with-HAVE_POSI.patch,
+ patches/0005-libv4l1-Apply-HAVE_POSIX_IOCTL.patch:
+ fixed ioctl prototypes on POSIX-compliant systems
+ * DETAILS: PATCHLEVEL++
+
2024-12-27 Ismael Luceno <ismael AT sourcemage.org>
* CONFIGURE, DEPENDS: added libbpf dep
* PRE_BUILD,
patches/0001-v4l2-tracer-Define-_LARGEFILE64_SOURCE.patch,
diff --git
a/video/v4l-utils/patches/0001-v4l2-tracer-Define-_LARGEFILE64_SOURCE.patch
b/video/v4l-utils/patches/0001-v4l2-tracer-Define-_LARGEFILE64_SOURCE.patch
index def2254..56e0e8a 100644
---
a/video/v4l-utils/patches/0001-v4l2-tracer-Define-_LARGEFILE64_SOURCE.patch
+++
b/video/v4l-utils/patches/0001-v4l2-tracer-Define-_LARGEFILE64_SOURCE.patch
@@ -1,7 +1,7 @@
From b348ae0d898acabb2d7f5e44bed1861161e00053 Mon Sep 17 00:00:00 2001
From: Ismael Luceno <ismael AT iodev.co.uk>
Date: Fri, 27 Dec 2024 16:44:12 +0100
-Subject: [PATCH 1/3] v4l2-tracer: Define _LARGEFILE64_SOURCE
+Subject: [PATCH 1/5] v4l2-tracer: Define _LARGEFILE64_SOURCE

Needed to expose mmap64 and open64 (required by musl).

diff --git
a/video/v4l-utils/patches/0002-qv4l2-Use-fcntl.h-instead-of-sys-fcntl.h.patch
b/video/v4l-utils/patches/0002-qv4l2-Use-fcntl.h-instead-of-sys-fcntl.h.patch
index d465cf4..bcbc036 100644
---
a/video/v4l-utils/patches/0002-qv4l2-Use-fcntl.h-instead-of-sys-fcntl.h.patch
+++
b/video/v4l-utils/patches/0002-qv4l2-Use-fcntl.h-instead-of-sys-fcntl.h.patch
@@ -1,7 +1,7 @@
From 68274f94f687fce197e0b59125774e9523b8cc7f Mon Sep 17 00:00:00 2001
From: Ismael Luceno <ismael AT iodev.co.uk>
Date: Fri, 27 Dec 2024 16:50:59 +0100
-Subject: [PATCH 2/3] qv4l2: Use <fcntl.h> instead of <sys/fcntl.h>
+Subject: [PATCH 2/5] qv4l2: Use <fcntl.h> instead of <sys/fcntl.h>

Upstream-Status: Pending
Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
diff --git
a/video/v4l-utils/patches/0003-meson-Add-support-for-libexecinfo.patch
b/video/v4l-utils/patches/0003-meson-Add-support-for-libexecinfo.patch
index 09439d8..1f415e6 100644
--- a/video/v4l-utils/patches/0003-meson-Add-support-for-libexecinfo.patch
+++ b/video/v4l-utils/patches/0003-meson-Add-support-for-libexecinfo.patch
@@ -1,7 +1,7 @@
From 207ac0cdacb806cf572f3abc9fb36227d054373c Mon Sep 17 00:00:00 2001
From: Ismael Luceno <ismael AT iodev.co.uk>
Date: Fri, 27 Dec 2024 17:10:57 +0100
-Subject: [PATCH 3/3] meson: Add support for libexecinfo
+Subject: [PATCH 3/5] meson: Add support for libexecinfo

Upstream-Status: Pending
Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
diff --git
a/video/v4l-utils/patches/0004-libv4l2-Guard-the-v4l2_ioctl-function-with-HAVE_POSI.patch

b/video/v4l-utils/patches/0004-libv4l2-Guard-the-v4l2_ioctl-function-with-HAVE_POSI.patch
new file mode 100644
index 0000000..7661185
--- /dev/null
+++
b/video/v4l-utils/patches/0004-libv4l2-Guard-the-v4l2_ioctl-function-with-HAVE_POSI.patch
@@ -0,0 +1,58 @@
+From fd882f9e77b13cbc6a669e6836c3943393b44152 Mon Sep 17 00:00:00 2001
+From: Michal Rostecki <vadorovsky AT gmail.com>
+Date: Fri, 6 Sep 2024 14:46:31 +0200
+Subject: [PATCH 4/5] libv4l2: Guard the v4l2_ioctl function with
HAVE_POSIX_IOCTL
+
+Lack of this check leads to issues on musl-based system. Even though
+compilation of libv4l2 itself with musl doesn't cause any errors,
+using the library inside gst-plugins-v4l2 causes a compiler error
+due to mismatch of the ioctl signature.
+
+A similar check is already performed in v4l2convert.c, so the change
+doesn't bring any inconsistency.
+
+Link: https://bugs.gentoo.org/896418
+Signed-off-by: Michal Rostecki <vadorovsky AT gmail.com>
+Signed-off-by: Hans Verkuil <hverkuil AT xs4all.nl>
+Upstream-Status: Backport
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ lib/include/libv4l2.h | 4 ++++
+ lib/libv4l2/libv4l2.c | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/lib/include/libv4l2.h b/lib/include/libv4l2.h
+index ea1870db03a4..16565555dba9 100644
+--- a/lib/include/libv4l2.h
++++ b/lib/include/libv4l2.h
+@@ -63,7 +63,11 @@ 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
++LIBV4L_PUBLIC int v4l2_ioctl(int fd, int request, ...);
++#else
+ LIBV4L_PUBLIC int v4l2_ioctl(int fd, unsigned long int request, ...);
++#endif
+ LIBV4L_PUBLIC ssize_t v4l2_read(int fd, void *buffer, size_t n);
+ LIBV4L_PUBLIC ssize_t v4l2_write(int fd, const void *buffer, size_t n);
+ LIBV4L_PUBLIC void *v4l2_mmap(void *start, size_t length, int prot, int
flags,
+diff --git a/lib/libv4l2/libv4l2.c b/lib/libv4l2/libv4l2.c
+index 032a4f1c471d..1607ec353268 100644
+--- a/lib/libv4l2/libv4l2.c
++++ b/lib/libv4l2/libv4l2.c
+@@ -1051,7 +1051,11 @@ static int v4l2_s_fmt(int index, struct v4l2_format
*dest_fmt)
+ return 0;
+ }
+
++#ifdef HAVE_POSIX_IOCTL
++int v4l2_ioctl(int fd, int request, ...)
++#else
+ int v4l2_ioctl(int fd, unsigned long int request, ...)
++#endif
+ {
+ void *arg;
+ va_list ap;
+--
+2.47.1
+
diff --git
a/video/v4l-utils/patches/0005-libv4l1-Apply-HAVE_POSIX_IOCTL.patch
b/video/v4l-utils/patches/0005-libv4l1-Apply-HAVE_POSIX_IOCTL.patch
new file mode 100644
index 0000000..f3d055d
--- /dev/null
+++ b/video/v4l-utils/patches/0005-libv4l1-Apply-HAVE_POSIX_IOCTL.patch
@@ -0,0 +1,47 @@
+From c9bcc78aeefdb9a30f54b1c3247747ae2bcd4ae6 Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Sat, 28 Dec 2024 20:05:43 +0100
+Subject: [PATCH 5/5] libv4l1: Apply HAVE_POSIX_IOCTL
+
+Upstream-Status: Pending
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ lib/include/libv4l1.h | 4 ++++
+ lib/libv4l1/libv4l1.c | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/lib/include/libv4l1.h b/lib/include/libv4l1.h
+index e16dea1c0f60..9cef62af4a7e 100644
+--- a/lib/include/libv4l1.h
++++ b/lib/include/libv4l1.h
+@@ -62,7 +62,11 @@ LIBV4L_PUBLIC extern FILE *v4l1_log_file;
+ LIBV4L_PUBLIC int v4l1_open(const char *file, int oflag, ...);
+ LIBV4L_PUBLIC int v4l1_close(int fd);
+ LIBV4L_PUBLIC int v4l1_dup(int fd);
++#ifdef HAVE_POSIX_IOCTL
++LIBV4L_PUBLIC int v4l1_ioctl(int fd, int request, ...);
++#else
+ LIBV4L_PUBLIC int v4l1_ioctl(int fd, unsigned long int request, ...);
++#endif
+ LIBV4L_PUBLIC ssize_t v4l1_read(int fd, void *buffer, size_t n);
+ LIBV4L_PUBLIC void *v4l1_mmap(void *start, size_t length, int prot, int
flags,
+ int fd, int64_t offset);
+diff --git a/lib/libv4l1/libv4l1.c b/lib/libv4l1/libv4l1.c
+index ec903305eebd..9fe930498713 100644
+--- a/lib/libv4l1/libv4l1.c
++++ b/lib/libv4l1/libv4l1.c
+@@ -478,7 +478,11 @@ int v4l1_dup(int fd)
+ return v4l2_dup(fd);
+ }
+
++#ifdef HAVE_POSIX_IOCTL
++int v4l1_ioctl(int fd, int request, ...)
++#else
+ int v4l1_ioctl(int fd, unsigned long int request, ...)
++#endif
+ {
+ void *arg;
+ va_list ap;
+--
+2.47.1
+


  • [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (cdfac4375155ed8a69f4c18ec37300f9bcffc047), Ismael Luceno, 12/28/2024

Archive powered by MHonArc 2.6.24.

Top of Page