package/brltty: fix input_event related compile failure
PATCH 1/1 package/brltty: fix input_event related compile failure
Add a patch to fix input_event time related compile failure. The problem is reported and fixed upstream.
Fixes:
http://autobuild.buildroot.net/results/7c5278c0ff2b2d8f88803e256803b31a75904efe/build-end.log
./system_linux.c: In function 'writeInputEvent':
./system_linux.c:962:23: error: 'struct input_event' has no member named 'time'; did you mean 'type'?
gettimeofday(&event.time, NULL);
^~~~
type--- ...nput_event-time-related-compile-fail.patch | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 package/brltty/0002-fix-input_event-time-related-compile-fail.patch
package/brltty/0002-fix-input_event-time-related-compile-fail.patch new file +52 -0
@@ -0,0 +1,52 @@ +From 43390f9906a8c663872e0eab56c1173032d1bd6c Mon Sep 17 00:00:00 2001 +From: Heiko Thiery <[email protected]> +Date: Sun, 7 Jun 2020 12:58:38 +0200 +Subject: [PATCH] fix input_event time related compile fail + +./system_linux.c: In function 'writeInputEvent': +./system_linux.c:962:23: error: 'struct input_event' has no member named 'time'; did you mean 'type'? + gettimeofday(&event.time, NULL); + ^~~~ + type + +Signed-off-by: Heiko Thiery <[email protected]> +--- + Programs/system_linux.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/Programs/system_linux.c b/Programs/system_linux.c +index a97ee7ff6..77052d32f 100644 +--- a/Programs/system_linux.c ++++ b/Programs/system_linux.c +@@ -40,6 +40,14 @@ + #ifdef HAVE_LINUX_INPUT_H + #include <linux/input.h> + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#endif ++ ++#ifndef input_event_usec ++#define input_event_usec time.tv_usec ++#endif ++ + #include "kbd_keycodes.h" + + LINUX_KEY_MAP(xt00) = { +@@ -957,9 +965,12 @@ int + writeInputEvent (UinputObject *uinput, uint16_t type, uint16_t code, int32_t value) { + #ifdef HAVE_LINUX_UINPUT_H + struct input_event event; ++ struct timeval tv; + + memset(&event, 0, sizeof(event)); +- gettimeofday(&event.time, NULL); ++ gettimeofday(&tv, NULL); ++ event.input_event_sec = tv.tv_sec; ++ event.input_event_usec = tv.tv_usec; + event.type = type; + event.code = code; + event.value = value; +-- +2.20.1 +
Signature · 1 line
2.20.1
Thomas Petazzoni
AppliedPATCH 1/1 package/brltty: fix input_event related compile failure
Quoted 12 lines · On Sun, 7 Jun 2020 20:11:17 +0200 Heiko Thiery <[email protected]> wrote:
Add a patch to fix
input_eventtime related compile failure. The problem is reported and fixed upstream.Fixes:
http://autobuild.buildroot.net/results/7c5278c0ff2b2d8f88803e256803b31a75904efe/build-end.log./system_linux.c: In function 'writeInputEvent':
./system_linux.c:962:23: error: 'structinput_event' has no member named 'time'; did you mean 'type'?gettimeofday(&event.time, NULL); ^~~~ type
Quoted 5 lines
Signed-off-by Heiko Thiery <[email protected]>--- ...nput_event-time-related-compile-fail.patch | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 package/brltty/0002-fix-input_event-time-related-compile-fail.patch
Applied to master, thanks. If not already done, please submit the patch upstream. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/brltty: fix input_event related compile failure
In reply to Heiko ThieryQuoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Heiko" == Heiko Thiery <[email protected]> writes:
Add a patch to fix
input_eventtime related compile failure. The problem is reported and fixed upstream.Fixes:
http://autobuild.buildroot.net/results/7c5278c0ff2b2d8f88803e256803b31a75904efe/build-end.log
Quoted 7 lines
./system_linux.c: In function 'writeInputEvent':
./system_linux.c:962:23: error: 'structinput_event' has no member named 'time'; did you mean 'type'?gettimeofday(&event.time, NULL); ^~~~ typeSigned-off-by Heiko Thiery <[email protected]>
Committed to 2020.05.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard