diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-11-25 00:44:51 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-27 13:23:27 +0000 |
commit | fca9534bc7e3eff9c2ed7f1956d9ed287901d9a6 (patch) | |
tree | 1878a9ac00219f769406ab6aeaecd2f1fd1d379c /meta/recipes-graphics/xorg-driver | |
parent | 49cf09110e18204f8ee47efbdc22d7eb346ea9d1 (diff) | |
download | openembedded-core-contrib-fca9534bc7e3eff9c2ed7f1956d9ed287901d9a6.tar.gz |
xf86-input-synaptics: Fix build on 32bit arches when using 64bit time_t
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/xorg-driver')
-rw-r--r-- | meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch | 51 | ||||
-rw-r--r-- | meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb | 2 |
2 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch new file mode 100644 index 0000000000..4bb7fb3e23 --- /dev/null +++ b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch @@ -0,0 +1,51 @@ +This patch avoids using time field of input_event structure which is not available +on 32bit arches supporting 64bit time_t structs, Patch makes it compatible with new +and keeps old input.h implementation functional as well. + +See https://sourceware.org/glibc/wiki/Y2038ProofnessDesign + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/src/eventcomm.c ++++ b/src/eventcomm.c +@@ -575,10 +575,12 @@ SynapticsReadEvent(InputInfoPtr pInfo, s + ev->type = EV_SYN; + ev->code = SYN_REPORT; + ev->value = 0; +- ev->time = last_event_time; +- } else if (ev->type == EV_SYN) +- last_event_time = ev->time; +- ++ ev->input_event_sec = last_event_time.tv_sec; ++ ev->input_event_usec = last_event_time.tv_usec; ++ } else if (ev->type == EV_SYN) { ++ last_event_time.tv_sec = ev->input_event_sec; ++ last_event_time.tv_usec = ev->input_event_usec; ++ } + return TRUE; + } + +@@ -725,7 +727,7 @@ EventReadHwState(InputInfoPtr pInfo, + case SYN_REPORT: + hw->numFingers = count_fingers(pInfo, comm); + if (proto_data->have_monotonic_clock) +- hw->millis = 1000 * ev.time.tv_sec + ev.time.tv_usec / 1000; ++ hw->millis = 1000 * ev.input_event_sec + ev.input_event_usec / 1000; + else + hw->millis = GetTimeInMillis(); + SynapticsCopyHwState(hwRet, hw); +--- a/src/eventcomm.h ++++ b/src/eventcomm.h +@@ -34,6 +34,11 @@ + #include <xf86Xinput.h> + #include "synproto.h" + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + /* for auto-dev: */ + #define DEV_INPUT_EVENT "/dev/input" + #define EVENT_DEV_NAME "event" diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb index dc31890f69..388350c96e 100644 --- a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb +++ b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb @@ -10,6 +10,8 @@ advanced features of the touchpad to become available." LIC_FILES_CHKSUM = "file://COPYING;md5=55aacd3535a741824955c5eb8f061398" +SRC_URI += "file://64bit_time_t_support.patch" + SRC_URI[md5sum] = "cfb79d3c975151f9bbf30b727c260cb9" SRC_URI[sha256sum] = "7af83526eff1c76e8b9e1553b34245c203d029028d8044dd9dcf71eef1001576" |