Skip to contentSkip to conversation

package/brltty: fix input_event related compile failure

PATCH New Heiko Thiery 3 participants 3 messages Jun 7, 2020 – Jul 12, 2020

lore
Share & tools
lore
#0 lore raw

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
new file mode 100644
index 0000000000..249d420ca9
@@ -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
#1 lore raw

PATCH 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_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
Quoted 5 lines
---
 ...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
#2 lore raw

PATCH 1/1 package/brltty: fix input_event related compile failure

In reply to Heiko Thiery
Quoted 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_event time 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: 'struct input_event' has no member named 'time'; did you mean 'type'?

   gettimeofday(&event.time, NULL);
                       ^~~~
                       type

Committed to 2020.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard