diff options
author | Andrea Adami <andrea.adami@gmail.com> | 2020-04-20 19:06:53 +0200 |
---|---|---|
committer | Paul Eggleton <bluelightning@bluelightning.org> | 2021-10-04 11:35:07 +1300 |
commit | 53adfde895c05d4bdaaba5aa27e08f2c7f31bdbe (patch) | |
tree | b21a51ac5c2b1aa1f0e5af0344470f480befaac0 /recipes-bsp | |
parent | a876aaa33317d388aa2e865f665fe6cc58d500a7 (diff) | |
download | meta-handheld-53adfde895c05d4bdaaba5aa27e08f2c7f31bdbe.tar.gz |
zaurusd: fix build with kernels < 4.16 and newer libc headers
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.adami@gmail.com>
Signed-off-by: Paul Eggleton <bluelightning@bluelightning.org>
Diffstat (limited to 'recipes-bsp')
-rw-r--r-- | recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch | 43 | ||||
-rw-r--r-- | recipes-bsp/zaurusd/zaurusd_git.bb | 3 |
2 files changed, 45 insertions, 1 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 + 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" |