summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/utouch/utouch-evemu/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch76
-rw-r--r--meta-oe/recipes-support/utouch/utouch-evemu_git.bb4
-rw-r--r--meta-oe/recipes-support/utouch/utouch-frame/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch41
-rw-r--r--meta-oe/recipes-support/utouch/utouch-frame/0001-include-sys-stat.h-for-fixing-build-issue-on-musl.patch (renamed from meta-oe/recipes-support/utouch/files/0001-include-sys-stat.h-for-fixing-build-issue-on-musl.patch)0
-rw-r--r--meta-oe/recipes-support/utouch/utouch-frame/remove-man-page-creation.patch (renamed from meta-oe/recipes-support/utouch/files/remove-man-page-creation.patch)0
-rw-r--r--meta-oe/recipes-support/utouch/utouch-frame_git.bb1
6 files changed, 121 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/utouch/utouch-evemu/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-support/utouch/utouch-evemu/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 0000000000..71bf572699
--- /dev/null
+++ b/meta-oe/recipes-support/utouch/utouch-evemu/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
@@ -0,0 +1,76 @@
1From 60987a1df8eb8c9196222375574dcd7bc0ad2daa Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Nov 2019 20:23:27 -0800
4Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
5
6time element is deprecated on new input_event structure in kernel's
7input.h [1]
8
9[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
10
11Upstream-Status: Pending
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 src/evemu-impl.h | 5 +++++
15 src/evemu.c | 16 +++++++++-------
16 2 files changed, 14 insertions(+), 7 deletions(-)
17
18diff --git a/src/evemu-impl.h b/src/evemu-impl.h
19index acf2976..c08d861 100644
20--- a/src/evemu-impl.h
21+++ b/src/evemu-impl.h
22@@ -21,6 +21,11 @@
23 #include <evemu.h>
24 #include <linux/uinput.h>
25
26+#ifndef input_event_sec
27+#define input_event_sec time.tv_sec
28+#define input_event_usec time.tv_usec
29+#endif
30+
31 #define EVPLAY_NBITS KEY_CNT
32 #define EVPLAY_NBYTES ((EVPLAY_NBITS + 7) / 8)
33
34diff --git a/src/evemu.c b/src/evemu.c
35index 21187af..160c915 100644
36--- a/src/evemu.c
37+++ b/src/evemu.c
38@@ -363,7 +363,7 @@ int evemu_read(struct evemu_device *dev, FILE *fp)
39 int evemu_write_event(FILE *fp, const struct input_event *ev)
40 {
41 return fprintf(fp, "E: %lu.%06u %04x %04x %d\n",
42- ev->time.tv_sec, (unsigned)ev->time.tv_usec,
43+ ev->input_event_sec, (unsigned)ev->input_event_usec,
44 ev->type, ev->code, ev->value);
45 }
46
47@@ -391,8 +391,8 @@ int evemu_read_event(FILE *fp, struct input_event *ev)
48 int value;
49 int ret = fscanf(fp, "E: %lu.%06u %04x %04x %d\n",
50 &sec, &usec, &type, &code, &value);
51- ev->time.tv_sec = sec;
52- ev->time.tv_usec = usec;
53+ ev->input_event_sec = sec;
54+ ev->input_event_usec = usec;
55 ev->type = type;
56 ev->code = code;
57 ev->value = value;
58@@ -411,12 +411,14 @@ int evemu_read_event_realtime(FILE *fp, struct input_event *ev,
59
60 if (evtime) {
61 if (!evtime->tv_sec)
62- *evtime = ev->time;
63- usec = 1000000L * (ev->time.tv_sec - evtime->tv_sec);
64- usec += ev->time.tv_usec - evtime->tv_usec;
65+ evtime->tv_sec = ev->input_event_sec;
66+ evtime->tv_usec = ev->input_event_usec;
67+ usec = 1000000L * (ev->input_event_sec - evtime->tv_sec);
68+ usec += ev->input_event_usec - evtime->tv_usec;
69 if (usec > 500) {
70 usleep(usec);
71- *evtime = ev->time;
72+ evtime->tv_sec = ev->input_event_sec;
73+ evtime->tv_usec = ev->input_event_usec;
74 }
75 }
76
diff --git a/meta-oe/recipes-support/utouch/utouch-evemu_git.bb b/meta-oe/recipes-support/utouch/utouch-evemu_git.bb
index 1dd5a86d50..41d1cbfd97 100644
--- a/meta-oe/recipes-support/utouch/utouch-evemu_git.bb
+++ b/meta-oe/recipes-support/utouch/utouch-evemu_git.bb
@@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
7 7
8inherit autotools 8inherit autotools
9 9
10SRC_URI = "git://bitmath.org/git/evemu.git;protocol=http" 10SRC_URI = "git://bitmath.org/git/evemu.git;protocol=http \
11 file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
12 "
11SRCREV = "9752b50e922572e4cd214ac45ed95e4ee410fe24" 13SRCREV = "9752b50e922572e4cd214ac45ed95e4ee410fe24"
12 14
13PV = "1.0.5+git${SRCPV}" 15PV = "1.0.5+git${SRCPV}"
diff --git a/meta-oe/recipes-support/utouch/utouch-frame/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-support/utouch/utouch-frame/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 0000000000..d405d43f14
--- /dev/null
+++ b/meta-oe/recipes-support/utouch/utouch-frame/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
@@ -0,0 +1,41 @@
1From 895b6996e232700fb2a428838feaef418cc64b70 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Nov 2019 22:52:13 -0800
4Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
5
6time element is deprecated on new input_event structure in kernel's
7input.h [1]
8
9[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
10
11Upstream-Status: Pending
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 src/frame-mtdev.c | 7 ++++++-
15 1 file changed, 6 insertions(+), 1 deletion(-)
16
17diff --git a/src/frame-mtdev.c b/src/frame-mtdev.c
18index c0f15d8..42ad380 100644
19--- a/src/frame-mtdev.c
20+++ b/src/frame-mtdev.c
21@@ -25,6 +25,11 @@
22 #include <errno.h>
23 #include <math.h>
24
25+#ifndef input_event_sec
26+#define input_event_sec time.tv_sec
27+#define input_event_usec time.tv_usec
28+#endif
29+
30 static int is_pointer(const struct evemu_device *dev)
31 {
32 return evemu_has_event(dev, EV_REL, REL_X) ||
33@@ -200,7 +205,7 @@ static int handle_abs_event(utouch_frame_handle fh,
34 static utouch_frame_time_t get_evtime_ms(const struct input_event *syn)
35 {
36 static const utouch_frame_time_t ms = 1000;
37- return syn->time.tv_usec / ms + syn->time.tv_sec * ms;
38+ return syn->input_event_usec / ms + syn->input_event_sec * ms;
39 }
40
41 const struct utouch_frame *
diff --git a/meta-oe/recipes-support/utouch/files/0001-include-sys-stat.h-for-fixing-build-issue-on-musl.patch b/meta-oe/recipes-support/utouch/utouch-frame/0001-include-sys-stat.h-for-fixing-build-issue-on-musl.patch
index f3c8eeb418..f3c8eeb418 100644
--- a/meta-oe/recipes-support/utouch/files/0001-include-sys-stat.h-for-fixing-build-issue-on-musl.patch
+++ b/meta-oe/recipes-support/utouch/utouch-frame/0001-include-sys-stat.h-for-fixing-build-issue-on-musl.patch
diff --git a/meta-oe/recipes-support/utouch/files/remove-man-page-creation.patch b/meta-oe/recipes-support/utouch/utouch-frame/remove-man-page-creation.patch
index 8706d91234..8706d91234 100644
--- a/meta-oe/recipes-support/utouch/files/remove-man-page-creation.patch
+++ b/meta-oe/recipes-support/utouch/utouch-frame/remove-man-page-creation.patch
diff --git a/meta-oe/recipes-support/utouch/utouch-frame_git.bb b/meta-oe/recipes-support/utouch/utouch-frame_git.bb
index 39d46af8e9..1ebebfa9f5 100644
--- a/meta-oe/recipes-support/utouch/utouch-frame_git.bb
+++ b/meta-oe/recipes-support/utouch/utouch-frame_git.bb
@@ -12,6 +12,7 @@ inherit autotools pkgconfig
12SRC_URI = "git://bitmath.org/git/frame.git;protocol=http \ 12SRC_URI = "git://bitmath.org/git/frame.git;protocol=http \
13 file://remove-man-page-creation.patch \ 13 file://remove-man-page-creation.patch \
14 file://0001-include-sys-stat.h-for-fixing-build-issue-on-musl.patch \ 14 file://0001-include-sys-stat.h-for-fixing-build-issue-on-musl.patch \
15 file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
15 " 16 "
16SRCREV = "95363d5a1f7394d71144bf3b408ef4e6db4350fc" 17SRCREV = "95363d5a1f7394d71144bf3b408ef4e6db4350fc"
17 18