* [Buildroot] [PATCH v1] package/libv4l: fix input_event related compile failure
@ 2020-05-04 21:51 Peter Seiderer
2020-05-09 21:16 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Peter Seiderer @ 2020-05-04 21:51 UTC (permalink / raw)
To: buildroot
Add two upstream patches fixing input_event time related
compile failures.
Fixes:
- http://autobuild.buildroot.net/results/3883a948e30cfd235cfca1fb8646fe8032f5e18d
keytable.c: In function 'test_event':
keytable.c:1536:11: error: 'struct input_event' has no member named 'time'; did you mean 'type'?
ev[i].time.tv_sec, ev[i].time.tv_usec,
^~~~
type
keytable.c:1536:30: error: 'struct input_event' has no member named 'time'; did you mean 'type'?
ev[i].time.tv_sec, ev[i].time.tv_usec,
^~~~
type
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
...02-keytable-use-input_event-properly.patch | 36 +++++++++++++++++++
...dd-compatibility-for-input_event_sec.patch | 35 ++++++++++++++++++
2 files changed, 71 insertions(+)
create mode 100644 package/libv4l/0002-keytable-use-input_event-properly.patch
create mode 100644 package/libv4l/0003-keytable-add-compatibility-for-input_event_sec.patch
diff --git a/package/libv4l/0002-keytable-use-input_event-properly.patch b/package/libv4l/0002-keytable-use-input_event-properly.patch
new file mode 100644
index 0000000000..980100455f
--- /dev/null
+++ b/package/libv4l/0002-keytable-use-input_event-properly.patch
@@ -0,0 +1,36 @@
+From a84fc5d02ffd7119b3e38b72339f5760991d14da Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Mon, 30 Mar 2020 14:24:34 -0700
+Subject: [PATCH 2/3] keytable: use input_event properly
+
+It does not use time_t under musl when time_t is 64-bit. The struct has
+compatibility defines. Instead of using time_t directly, use those
+defines.
+
+Fixes compilation under musl 1.2.0 under 32-bit OSes.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+Signed-off-by: Sean Young <sean@mess.org>
+
+[Upstream: https://git.linuxtv.org/v4l-utils.git/patch/?id=38f4ce74275ae4625463f7eec78764715a0b6246]
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ utils/keytable/keytable.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
+index 6cb0217..318c064 100644
+--- a/utils/keytable/keytable.c
++++ b/utils/keytable/keytable.c
+@@ -1533,7 +1533,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) {
+--
+2.26.2
+
diff --git a/package/libv4l/0003-keytable-add-compatibility-for-input_event_sec.patch b/package/libv4l/0003-keytable-add-compatibility-for-input_event_sec.patch
new file mode 100644
index 0000000000..cfc44d0fd8
--- /dev/null
+++ b/package/libv4l/0003-keytable-add-compatibility-for-input_event_sec.patch
@@ -0,0 +1,35 @@
+From 986345e5673b1e68db513a4f72e6e79c74512a3b Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Tue, 7 Apr 2020 18:13:44 -0700
+Subject: [PATCH 3/3] keytable: add compatibility for input_event_sec
+
+Linux 4.16 added support for this macro. When it is not available,
+define it back to the previous value.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+Signed-off-by: Sean Young <sean@mess.org>
+
+[Upstream: https://git.linuxtv.org/v4l-utils.git/patch/?id=8b7e6ce9367fe09ca9398b5f3cc75bba2598b162]
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ utils/keytable/keytable.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
+index 318c064..705867c 100644
+--- a/utils/keytable/keytable.c
++++ b/utils/keytable/keytable.c
+@@ -62,6 +62,10 @@ struct input_keymap_entry_v2 {
+ u_int8_t scancode[32];
+ };
+
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
+
+ #define IR_PROTOCOLS_USER_DIR IR_KEYTABLE_USER_DIR "/protocols"
+ #define IR_PROTOCOLS_SYSTEM_DIR IR_KEYTABLE_SYSTEM_DIR "/protocols"
+--
+2.26.2
+
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH v1] package/libv4l: fix input_event related compile failure
2020-05-04 21:51 [Buildroot] [PATCH v1] package/libv4l: fix input_event related compile failure Peter Seiderer
@ 2020-05-09 21:16 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2020-05-09 21:16 UTC (permalink / raw)
To: buildroot
On Mon, 4 May 2020 23:51:07 +0200
Peter Seiderer <ps.report@gmx.net> wrote:
> Add two upstream patches fixing input_event time related
> compile failures.
>
> Fixes:
>
> - http://autobuild.buildroot.net/results/3883a948e30cfd235cfca1fb8646fe8032f5e18d
>
> keytable.c: In function 'test_event':
> keytable.c:1536:11: error: 'struct input_event' has no member named 'time'; did you mean 'type'?
> ev[i].time.tv_sec, ev[i].time.tv_usec,
> ^~~~
> type
> keytable.c:1536:30: error: 'struct input_event' has no member named 'time'; did you mean 'type'?
> ev[i].time.tv_sec, ev[i].time.tv_usec,
> ^~~~
> type
>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> ...02-keytable-use-input_event-properly.patch | 36 +++++++++++++++++++
> ...dd-compatibility-for-input_event_sec.patch | 35 ++++++++++++++++++
> 2 files changed, 71 insertions(+)
> create mode 100644 package/libv4l/0002-keytable-use-input_event-properly.patch
> create mode 100644 package/libv4l/0003-keytable-add-compatibility-for-input_event_sec.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-09 21:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04 21:51 [Buildroot] [PATCH v1] package/libv4l: fix input_event related compile failure Peter Seiderer
2020-05-09 21:16 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.