Browse Source

v4l-utils: Update to 1.16.5

Add Alpine Linux patch that fixes a crash under Musl.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 6 years ago
parent
commit
b266b21306
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
3 changed files with 40 additions and 4 deletions
  1. +3
    -3
      libs/libv4l/Makefile
  2. +1
    -1
      libs/libv4l/patches/010-remove-libudev-check.patch
  3. +36
    -0
      libs/libv4l/patches/030-getsubopt.patch

+ 3
- 3
libs/libv4l/Makefile View File

@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=v4l-utils
PKG_VERSION:=1.16.3
PKG_VERSION:=1.16.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://www.linuxtv.org/downloads/v4l-utils
PKG_HASH:=7c5c0d49c130cf65d384f28e9f3a53c5f7d17bf18740c48c40810e0fbbed5b54
PKG_HASH:=ed80242510385017a1dc566e17a285a77222bb301f5bc19386badfcc2c19df1b
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0 LGPL-2.1
@ -29,7 +29,7 @@ include $(INCLUDE_DIR)/nls.mk
define Package/libv4l/Default
TITLE:=Video 4 Linux
URL:=http://www.linuxtv.org/
URL:=https://www.linuxtv.org/
endef
define Package/libv4l/Default/description


+ 1
- 1
libs/libv4l/patches/010-remove-libudev-check.patch View File

@ -1,6 +1,6 @@
--- a/configure.ac
+++ b/configure.ac
@@ -283,16 +283,9 @@ else
@@ -309,16 +309,9 @@ else
AC_MSG_WARN(ALSA library not available)
fi


+ 36
- 0
libs/libv4l/patches/030-getsubopt.patch View File

@ -0,0 +1,36 @@
POSIX says that behavior when subopts list is empty is undefined.
musl libs will set value to NULL which leads to crash.
Simply avoid getsubopt, since we cannot rely on it.
diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
index 3ea6cd3..291fb3e 100644
--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
@@ -692,16 +692,17 @@ static bool parse_subset(char *optarg)
static bool parse_next_subopt(char **subs, char **value)
{
- static char *const subopts[] = {
- NULL
- };
- int opt = getsubopt(subs, subopts, value);
+ char *p = *subs;
+ *value = *subs;
- if (opt < 0 || *value)
- return false;
- fprintf(stderr, "No value given to suboption <%s>\n",
- subopts[opt]);
- return true;
+ while (*p && *p != ',')
+ p++;
+
+ if (*p)
+ *p++ = '\0';
+
+ *subs = p;
+ return false;
}
void common_cmd(int ch, char *optarg)

Loading…
Cancel
Save