The Y2038 changes broke the build for older 32bit devices using
older kernels.

As seen on: https://sourceware.org/glibc/wiki/Y2038ProofnessDesign

Signed-off-by: Andrea Adami <andrea.ad...@gmail.com>
---
 .../zaurusd/zaurusd/add_64bit_time_t.patch    | 43 +++++++++++++++++++
 recipes-bsp/zaurusd/zaurusd_git.bb            |  3 +-
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch

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.ad...@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.ad...@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
+
diff --git a/recipes-bsp/zaurusd/zaurusd_git.bb 
b/recipes-bsp/zaurusd/zaurusd_git.bb
index d69805b..1f8e40b 100644
--- a/recipes-bsp/zaurusd/zaurusd_git.bb
+++ b/recipes-bsp/zaurusd/zaurusd_git.bb
@@ -24,7 +24,8 @@ SRC_URI = "git://git.yoctoproject.org/${BPN} \
            file://01-check-toggle-portait \
            file://use-ts-symlink-instead-of-hardcoding.diff \
            file://0001-zaurusd-add-support-for-collie.patch \
-           file://allow-newer-tslib.patch"
+           file://allow-newer-tslib.patch \
+           file://add_64bit_time_t.patch"
 
 
 S = "${WORKDIR}/git"
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#83995): 
https://lists.openembedded.org/g/openembedded-devel/message/83995
Mute This Topic: https://lists.openembedded.org/mt/73154204/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to