mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-16 04:17:25 +00:00
v4l-utils: Update to 1.18.0
- Fix build on 32bit arches with 64bit time_t - Forward port patches Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+45
@@ -0,0 +1,45 @@
|
|||||||
|
From 137ce23ae677b11e5483ef810751edae7bf96bb9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Sat, 30 Nov 2019 18:40:06 -0800
|
||||||
|
Subject: [PATCH] Define error_t and include sys/types.h
|
||||||
|
|
||||||
|
Fix 'unknown type name' for error_t and u_int32_t.
|
||||||
|
u_int32_t is defined in sys/type.h
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
utils/ir-ctl/keymap.h | 4 ++++
|
||||||
|
utils/keytable/keymap.h | 5 +++++
|
||||||
|
2 files changed, 9 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/utils/ir-ctl/keymap.h b/utils/ir-ctl/keymap.h
|
||||||
|
index f2b2963..1f8a3f8 100644
|
||||||
|
--- a/utils/ir-ctl/keymap.h
|
||||||
|
+++ b/utils/ir-ctl/keymap.h
|
||||||
|
@@ -2,6 +2,10 @@
|
||||||
|
#ifndef __KEYMAP_H
|
||||||
|
#define __KEYMAP_H
|
||||||
|
|
||||||
|
+#include <sys/types.h>
|
||||||
|
+#ifndef error_t
|
||||||
|
+typedef int error_t;
|
||||||
|
+#endif
|
||||||
|
struct keymap {
|
||||||
|
struct keymap *next;
|
||||||
|
char *name;
|
||||||
|
diff --git a/utils/keytable/keymap.h b/utils/keytable/keymap.h
|
||||||
|
index f2b2963..345d55d 100644
|
||||||
|
--- a/utils/keytable/keymap.h
|
||||||
|
+++ b/utils/keytable/keymap.h
|
||||||
|
@@ -2,6 +2,11 @@
|
||||||
|
#ifndef __KEYMAP_H
|
||||||
|
#define __KEYMAP_H
|
||||||
|
|
||||||
|
+#include <sys/types.h>
|
||||||
|
+#ifndef error_t
|
||||||
|
+typedef int error_t;
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
struct keymap {
|
||||||
|
struct keymap *next;
|
||||||
|
char *name;
|
||||||
+41
@@ -0,0 +1,41 @@
|
|||||||
|
From b213da2d5fcc93cd24fc880c71c717d8e2ce2968 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Sat, 30 Nov 2019 18:43:21 -0800
|
||||||
|
Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
|
||||||
|
|
||||||
|
time element is deprecated on new input_event structure in kernel's
|
||||||
|
input.h [1]
|
||||||
|
|
||||||
|
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
|
||||||
|
|
||||||
|
Upstream-Status: Pending
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
utils/keytable/keytable.c | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
|
||||||
|
index 6cb0217..59ff1ee 100644
|
||||||
|
--- a/utils/keytable/keytable.c
|
||||||
|
+++ b/utils/keytable/keytable.c
|
||||||
|
@@ -53,6 +53,11 @@
|
||||||
|
|
||||||
|
# define N_(string) string
|
||||||
|
|
||||||
|
+#ifndef input_event_sec
|
||||||
|
+#define input_event_sec time.tv_sec
|
||||||
|
+#define input_event_usec time.tv_usec
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
struct input_keymap_entry_v2 {
|
||||||
|
#define KEYMAP_BY_INDEX (1 << 0)
|
||||||
|
u_int8_t flags;
|
||||||
|
@@ -1533,7 +1538,7 @@ static void test_event(struct rc_device *rc_dev, int fd)
|
||||||
|
|
||||||
|
for (i = 0; i < rd / sizeof(struct input_event); i++) {
|
||||||
|
printf(_("%ld.%06ld: event type %s(0x%02x)"),
|
||||||
|
- ev[i].time.tv_sec, ev[i].time.tv_usec,
|
||||||
|
+ ev[i].input_event_sec, ev[i].input_event_usec,
|
||||||
|
get_event_name(events_type, ev[i].type), ev[i].type);
|
||||||
|
|
||||||
|
switch (ev[i].type) {
|
||||||
+13
-12
@@ -1,24 +1,26 @@
|
|||||||
From f7a4b79b3323534460a63b3e6c58ebaf06adf207 Mon Sep 17 00:00:00 2001
|
From 4a10eab0e31d69948161241b1801c41201a5d081 Mon Sep 17 00:00:00 2001
|
||||||
From: Khem Raj <raj.khem@gmail.com>
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
Date: Fri, 14 Jul 2017 13:20:05 -0700
|
Date: Sat, 30 Nov 2019 18:50:34 -0800
|
||||||
Subject: [PATCH] v4l2-ctl: Do not use getsubopt
|
Subject: [PATCH] Do not use getsubopt
|
||||||
|
|
||||||
POSIX says that behavior when subopts list is empty is undefined.
|
POSIX says that behavior when subopts list is empty is undefined.
|
||||||
musl libs will set value to NULL which leads to crash.
|
musl libs will set value to NULL which leads to crash.
|
||||||
|
|
||||||
Taken from AlpineLinux
|
Simply avoid getsubopt, since we cannot rely on it.
|
||||||
|
|
||||||
|
Imported from Alpine Linux
|
||||||
|
|
||||||
|
Upstream-Status: Pending
|
||||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
|
||||||
---
|
---
|
||||||
utils/v4l2-ctl/v4l2-ctl-common.cpp | 19 ++++++++++---------
|
utils/v4l2-ctl/v4l2-ctl-common.cpp | 18 ++++++++++--------
|
||||||
1 file changed, 10 insertions(+), 9 deletions(-)
|
1 file changed, 10 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
|
diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
|
||||||
index 3ea6cd3..291fb3e 100644
|
index 651917e..cea57b7 100644
|
||||||
--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
|
--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
|
||||||
+++ b/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)
|
@@ -782,15 +782,17 @@ static bool parse_subset(char *optarg)
|
||||||
|
|
||||||
static bool parse_next_subopt(char **subs, char **value)
|
static bool parse_next_subopt(char **subs, char **value)
|
||||||
{
|
{
|
||||||
@@ -31,8 +33,7 @@ index 3ea6cd3..291fb3e 100644
|
|||||||
|
|
||||||
- if (opt < 0 || *value)
|
- if (opt < 0 || *value)
|
||||||
- return false;
|
- return false;
|
||||||
- fprintf(stderr, "No value given to suboption <%s>\n",
|
- fprintf(stderr, "Missing suboption value\n");
|
||||||
- subopts[opt]);
|
|
||||||
- return true;
|
- return true;
|
||||||
+ while (*p && *p != ',')
|
+ while (*p && *p != ',')
|
||||||
+ p++;
|
+ p++;
|
||||||
@@ -44,4 +45,4 @@ index 3ea6cd3..291fb3e 100644
|
|||||||
+ return false;
|
+ return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void common_cmd(int ch, char *optarg)
|
void common_cmd(const std::string &media_bus_info, int ch, char *optarg)
|
||||||
+5
-3
@@ -20,10 +20,12 @@ SRC_URI = "http://linuxtv.org/downloads/v4l-utils/v4l-utils-${PV}.tar.bz2 \
|
|||||||
file://mediactl-pkgconfig.patch \
|
file://mediactl-pkgconfig.patch \
|
||||||
file://export-mediactl-headers.patch \
|
file://export-mediactl-headers.patch \
|
||||||
file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \
|
file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \
|
||||||
file://0003-v4l2-ctl-Do-not-use-getsubopt.patch \
|
file://0005-Define-error_t-and-include-sys-types.h.patch \
|
||||||
|
file://0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
|
||||||
|
file://0007-Do-not-use-getsubopt.patch \
|
||||||
"
|
"
|
||||||
SRC_URI[md5sum] = "de272817133c0dca000a78a5c8c8ec8b"
|
SRC_URI[md5sum] = "18996bd5e9d83d47055c05de376708cd"
|
||||||
SRC_URI[sha256sum] = "ed80242510385017a1dc566e17a285a77222bb301f5bc19386badfcc2c19df1b"
|
SRC_URI[sha256sum] = "6cb60d822eeed20486a03cc23e0fc65956fbc1e85e0c1a7477f68bbd9802880d"
|
||||||
|
|
||||||
EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev"
|
EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev"
|
||||||
|
|
||||||
Reference in New Issue
Block a user