summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch51
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb2
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 @@
1This patch avoids using time field of input_event structure which is not available
2on 32bit arches supporting 64bit time_t structs, Patch makes it compatible with new
3and keeps old input.h implementation functional as well.
4
5See https://sourceware.org/glibc/wiki/Y2038ProofnessDesign
6
7Upstream-Status: Pending
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9
10--- a/src/eventcomm.c
11+++ b/src/eventcomm.c
12@@ -575,10 +575,12 @@ SynapticsReadEvent(InputInfoPtr pInfo, s
13 ev->type = EV_SYN;
14 ev->code = SYN_REPORT;
15 ev->value = 0;
16- ev->time = last_event_time;
17- } else if (ev->type == EV_SYN)
18- last_event_time = ev->time;
19-
20+ ev->input_event_sec = last_event_time.tv_sec;
21+ ev->input_event_usec = last_event_time.tv_usec;
22+ } else if (ev->type == EV_SYN) {
23+ last_event_time.tv_sec = ev->input_event_sec;
24+ last_event_time.tv_usec = ev->input_event_usec;
25+ }
26 return TRUE;
27 }
28
29@@ -725,7 +727,7 @@ EventReadHwState(InputInfoPtr pInfo,
30 case SYN_REPORT:
31 hw->numFingers = count_fingers(pInfo, comm);
32 if (proto_data->have_monotonic_clock)
33- hw->millis = 1000 * ev.time.tv_sec + ev.time.tv_usec / 1000;
34+ hw->millis = 1000 * ev.input_event_sec + ev.input_event_usec / 1000;
35 else
36 hw->millis = GetTimeInMillis();
37 SynapticsCopyHwState(hwRet, hw);
38--- a/src/eventcomm.h
39+++ b/src/eventcomm.h
40@@ -34,6 +34,11 @@
41 #include <xf86Xinput.h>
42 #include "synproto.h"
43
44+#ifndef input_event_sec
45+#define input_event_sec time.tv_sec
46+#define input_event_usec time.tv_usec
47+#endif
48+
49 /* for auto-dev: */
50 #define DEV_INPUT_EVENT "/dev/input"
51 #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."
10 10
11LIC_FILES_CHKSUM = "file://COPYING;md5=55aacd3535a741824955c5eb8f061398" 11LIC_FILES_CHKSUM = "file://COPYING;md5=55aacd3535a741824955c5eb8f061398"
12 12
13SRC_URI += "file://64bit_time_t_support.patch"
14
13SRC_URI[md5sum] = "cfb79d3c975151f9bbf30b727c260cb9" 15SRC_URI[md5sum] = "cfb79d3c975151f9bbf30b727c260cb9"
14SRC_URI[sha256sum] = "7af83526eff1c76e8b9e1553b34245c203d029028d8044dd9dcf71eef1001576" 16SRC_URI[sha256sum] = "7af83526eff1c76e8b9e1553b34245c203d029028d8044dd9dcf71eef1001576"
15 17