aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch')
-rw-r--r--recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch b/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
new file mode 100644
index 0000000..5f9587a
--- /dev/null
+++ b/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
@@ -0,0 +1,43 @@
+From d15b20fd9e8927db5dc4303f2e6c11cfa8d6fe95 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Mon, 20 Apr 2020 16:21:22 +0200
+Subject: [PATCH] tskeys.c: add support for 64bit time_t
+
+Upgrade the recipe to cope with the 64-bit time changes introduced in 4.16
+
+Fix:
+
+| tskeys.c: In function 'press_key':
+| tskeys.c:141:4: error: 'struct input_event' has no member named 'time'
+| 141 | ev.time.tv_sec = time(0);
+| | ^
+| tskeys.c:142:4: error: 'struct input_event' has no member named 'time'
+| 142 | ev.time.tv_usec = 0;
+| | ^
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ apps/tskeys/tskeys.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/apps/tskeys/tskeys.c b/apps/tskeys/tskeys.c
+index 264dfb7..36e3bfd 100644
+--- a/apps/tskeys/tskeys.c
++++ b/apps/tskeys/tskeys.c
+@@ -138,8 +138,13 @@ void press_key(int fd, int key, int pressed)
+ struct input_event ev;
+ int r;
+
++#if !defined(__USE_TIME_BITS64)
+ ev.time.tv_sec = time(0);
+ ev.time.tv_usec = 0;
++#else
++ ev.input_event_sec = time(0);
++ ev.input_event_usec = 0;
++#endif
+ ev.type = EV_KEY;
+ ev.code = key;
+ ev.value = pressed;
+--
+2.17.1
+