All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-python][PATCH 1/9] python-evdev: Fix build for 32bit arches with 64bit time_t
@ 2019-12-01 18:46 Khem Raj
  2019-12-01 18:46 ` [meta-oe][PATCH 2/9] x11vnc: " Khem Raj
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Khem Raj @ 2019-12-01 18:46 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../recipes-devtools/python/python-evdev.inc  |  4 +
 ...ld-on-32bit-arches-with-64bit-time_t.patch | 83 +++++++++++++++++++
 2 files changed, 87 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python-evdev/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch

diff --git a/meta-python/recipes-devtools/python/python-evdev.inc b/meta-python/recipes-devtools/python/python-evdev.inc
index 953094ba74..a536815358 100644
--- a/meta-python/recipes-devtools/python/python-evdev.inc
+++ b/meta-python/recipes-devtools/python/python-evdev.inc
@@ -3,6 +3,10 @@ HOMEPAGE = "https://github.com/gvalkov/python-evdev"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=18debddbb3f52c661a129724a883a8e2"
 
+FILESEXTRAPATHS_prepend := "${THISDIR}/python-evdev:"
+
+SRC_URI += " file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch"
+
 SRC_URI[md5sum] = "53e440943dfa2514f95b3c448d6a36cb"
 SRC_URI[sha256sum] = "b03f5e1be5b4a5327494a981b831d251a142b09e8778eda1a8b53eba91100166"
 
diff --git a/meta-python/recipes-devtools/python/python-evdev/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-python/recipes-devtools/python/python-evdev/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 0000000000..154172ca88
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-evdev/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
@@ -0,0 +1,83 @@
+From 435e78aaf6745e4da0fe3d4455473011626c77d1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Nov 2019 11:21:20 -0800
+Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
+
+time element is deprecated on new input_event structure in kernel's
+input.h [1]
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
+
+Upstream-Status: Submitted [https://github.com/gvalkov/python-evdev/pull/112]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ evdev/input.c  | 13 +++++++++----
+ evdev/uinput.c |  9 ++++++++-
+ 2 files changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/evdev/input.c b/evdev/input.c
+index 67b9348..432db92 100644
+--- a/evdev/input.c
++++ b/evdev/input.c
+@@ -24,6 +24,11 @@
+ #include <linux/input.h>
+ #endif
+ 
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ #define MAX_NAME_SIZE 256
+ 
+ extern char*  EV_NAME[EV_CNT];
+@@ -60,8 +65,8 @@ device_read(PyObject *self, PyObject *args)
+         return NULL;
+     }
+ 
+-    PyObject* sec  = PyLong_FromLong(event.time.tv_sec);
+-    PyObject* usec = PyLong_FromLong(event.time.tv_usec);
++    PyObject* sec  = PyLong_FromLong(event.input_event_sec);
++    PyObject* usec = PyLong_FromLong(event.input_event_usec);
+     PyObject* val  = PyLong_FromLong(event.value);
+     PyObject* py_input_event = NULL;
+ 
+@@ -102,8 +107,8 @@ device_read_many(PyObject *self, PyObject *args)
+ 
+     // Construct a list of event tuples, which we'll make sense of in Python
+     for (unsigned i = 0 ; i < nread/event_size ; i++) {
+-        sec  = PyLong_FromLong(event[i].time.tv_sec);
+-        usec = PyLong_FromLong(event[i].time.tv_usec);
++        sec  = PyLong_FromLong(event[i].input_event_sec);
++        usec = PyLong_FromLong(event[i].input_event_usec);
+         val  = PyLong_FromLong(event[i].value);
+ 
+         py_input_event = Py_BuildValue("OOhhO", sec, usec, event[i].type, event[i].code, val);
+diff --git a/evdev/uinput.c b/evdev/uinput.c
+index 192568d..56fe86c 100644
+--- a/evdev/uinput.c
++++ b/evdev/uinput.c
+@@ -16,6 +16,10 @@
+ #include <linux/uinput.h>
+ #endif
+ 
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
+ 
+ // Workaround for installing on kernels newer than 4.4.
+ #ifndef FF_MAX_EFFECTS
+@@ -232,8 +236,11 @@ uinput_write(PyObject *self, PyObject *args)
+     if (!ret) return NULL;
+ 
+     struct input_event event;
++    struct timeval tval;
+     memset(&event, 0, sizeof(event));
+-    gettimeofday(&event.time, 0);
++    gettimeofday(&tval, 0);
++    event.input_event_usec = tval.tv_usec;
++    event.input_event_sec = tval.tv_sec;
+     event.type = type;
+     event.code = code;
+     event.value = value;
-- 
2.24.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH 2/9] x11vnc: Fix build for 32bit arches with 64bit time_t
  2019-12-01 18:46 [meta-python][PATCH 1/9] python-evdev: Fix build for 32bit arches with 64bit time_t Khem Raj
@ 2019-12-01 18:46 ` Khem Raj
  2019-12-01 18:46 ` [meta-oe][PATCH 3/9] evtest: " Khem Raj
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2019-12-01 18:46 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ld-on-32bit-arches-with-64bit-time_t.patch | 111 ++++++++++++++++++
 .../recipes-graphics/x11vnc/x11vnc_0.9.16.bb  |   5 +-
 2 files changed, 114 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch

diff --git a/meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 0000000000..d44445fa9f
--- /dev/null
+++ b/meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
@@ -0,0 +1,111 @@
+From 8ab672ccc67b64058cffac2cd19a0d3b75d5aa25 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Nov 2019 11:43:32 -0800
+Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
+
+time element is deprecated on new input_event structure in kernel's
+input.h [1]
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
+
+Upstream-Status: Submitted [https://github.com/LibVNC/x11vnc/pull/117]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/uinput.c | 28 ++++++++++++++++++++++++----
+ 1 file changed, 24 insertions(+), 4 deletions(-)
+
+diff --git a/src/uinput.c b/src/uinput.c
+index 28fbad3..343b7c5 100644
+--- a/src/uinput.c
++++ b/src/uinput.c
+@@ -54,6 +54,11 @@ so, delete this exception statement from your version.
+ #include <linux/input.h>
+ #include <linux/uinput.h>
+ 
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ #if !defined(EV_SYN) || !defined(SYN_REPORT)
+ #undef UINPUT_OK
+ #endif
+@@ -710,6 +715,7 @@ void parse_uinput_str(char *in) {
+ static void ptr_move(int dx, int dy) {
+ #ifdef UINPUT_OK
+ 	struct input_event ev;
++	struct timeval tval;
+ 	int d = direct_rel_fd < 0 ? fd : direct_rel_fd;
+ 
+ 	if (injectable && strchr(injectable, 'M') == NULL) {
+@@ -720,7 +726,9 @@ static void ptr_move(int dx, int dy) {
+ 
+ 	if (db) fprintf(stderr, "ptr_move(%d, %d) fd=%d\n", dx, dy, d);
+ 
+-	gettimeofday(&ev.time, NULL);
++	gettimeofday(&tval, NULL);
++	ev.input_event_sec = tval.tv_sec;
++	ev.input_event_usec = tval.tv_usec;
+ 	ev.type = EV_REL;
+ 	ev.code = REL_Y;
+ 	ev.value = dy;
+@@ -755,6 +763,7 @@ static void apply_tslib(int *x, int *y) {
+ static void ptr_abs(int x, int y, int p) {
+ #ifdef UINPUT_OK
+ 	struct input_event ev;
++	struct timeval tval;
+ 	int x0, y0;
+ 	int d = direct_abs_fd < 0 ? fd : direct_abs_fd;
+ 
+@@ -773,7 +782,9 @@ static void ptr_abs(int x, int y, int p) {
+ 
+ 	if (db) fprintf(stderr, "ptr_abs(%d, %d => %d %d, p=%d) fd=%d\n", x0, y0, x, y, p, d);
+ 
+-	gettimeofday(&ev.time, NULL);
++	gettimeofday(&tval, NULL);
++	ev.input_event_sec = tval.tv_sec;
++	ev.input_event_usec = tval.tv_usec;
+ 	ev.type = EV_ABS;
+ 	ev.code = ABS_Y;
+ 	ev.value = y;
+@@ -950,6 +961,7 @@ if (0) {usleep(100*1000) ;}
+ static void button_click(int down, int btn) {
+ #ifdef UINPUT_OK
+ 	struct input_event ev;
++	struct timeval tval;
+ 	int d = direct_btn_fd < 0 ? fd : direct_btn_fd;
+ 
+ 	if (injectable && strchr(injectable, 'B') == NULL) {
+@@ -959,7 +971,12 @@ static void button_click(int down, int btn) {
+ 	if (db) fprintf(stderr, "button_click: btn %d %s fd=%d\n", btn, down ? "down" : "up", d);
+ 
+ 	memset(&ev, 0, sizeof(ev));
+-	gettimeofday(&ev.time, NULL);
++	gettimeofday(&tval, NULL);
++	gettimeofday(&tval, NULL);
++	ev.input_event_sec = tval.tv_sec;
++	ev.input_event_usec = tval.tv_usec;
++	ev.input_event_sec = tval.tv_sec;
++	ev.input_event_usec = tval.tv_usec;
+ 	ev.type = EV_KEY;
+ 	ev.value = down;
+ 
+@@ -1230,6 +1247,7 @@ void uinput_pointer_command(int mask, int x, int y, rfbClientPtr client) {
+ void uinput_key_command(int down, int keysym, rfbClientPtr client) {
+ #ifdef UINPUT_OK
+ 	struct input_event ev;
++	struct timeval tval;
+ 	int scancode;
+ 	allowed_input_t input;
+ 	int d = direct_key_fd < 0 ? fd : direct_key_fd;
+@@ -1253,7 +1271,9 @@ void uinput_key_command(int down, int keysym, rfbClientPtr client) {
+ 	if (db) fprintf(stderr, "uinput_key_command: %d -> %d %s fd=%d\n", keysym, scancode, down ? "down" : "up", d);
+ 
+ 	memset(&ev, 0, sizeof(ev));
+-	gettimeofday(&ev.time, NULL);
++	gettimeofday(&tval, NULL);
++	ev.input_event_sec = tval.tv_sec;
++	ev.input_event_usec = tval.tv_usec;
+ 	ev.type = EV_KEY;
+ 	ev.code = (unsigned char) scancode;
+ 	ev.value = down;
diff --git a/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb b/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
index d0c9f774fe..0d84c420a1 100644
--- a/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
+++ b/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
@@ -10,8 +10,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 SRCREV = "4ca006fed80410bd9b061a1519bd5d9366bb0bc8"
 SRC_URI = "git://github.com/LibVNC/x11vnc \
            file://starting-fix.patch \
-	   file://0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch \
-"
+           file://0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch \
+           file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
+           "
 S = "${WORKDIR}/git"
 
 DEPENDS = "\
-- 
2.24.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH 3/9] evtest: Fix build for 32bit arches with 64bit time_t
  2019-12-01 18:46 [meta-python][PATCH 1/9] python-evdev: Fix build for 32bit arches with 64bit time_t Khem Raj
  2019-12-01 18:46 ` [meta-oe][PATCH 2/9] x11vnc: " Khem Raj
@ 2019-12-01 18:46 ` Khem Raj
  2019-12-01 18:46 ` [meta-oe][PATCH 4/9] lirc: " Khem Raj
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2019-12-01 18:46 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ld-on-32bit-arches-with-64bit-time_t.patch | 41 +++++++++++++++++++
 meta-oe/recipes-test/evtest/evtest_1.34.bb    |  6 ++-
 2 files changed, 45 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-test/evtest/evtest/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch

diff --git a/meta-oe/recipes-test/evtest/evtest/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-test/evtest/evtest/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 0000000000..706322d565
--- /dev/null
+++ b/meta-oe/recipes-test/evtest/evtest/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
@@ -0,0 +1,41 @@
+From fa57c78c33d26084f85f1a6b4c29378631dc9395 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Nov 2019 11:58:58 -0800
+Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
+
+time element is deprecated on new input_event structure in kernel's
+input.h [1]
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/libevdev/evtest/merge_requests/6]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ evtest.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/evtest.c b/evtest.c
+index 548c203..93063cd 100644
+--- a/evtest.c
++++ b/evtest.c
+@@ -61,6 +61,11 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ 
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ #define BITS_PER_LONG (sizeof(long) * 8)
+ #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
+ #define OFF(x)  ((x)%BITS_PER_LONG)
+@@ -1140,7 +1145,7 @@ static int print_events(int fd)
+ 			type = ev[i].type;
+ 			code = ev[i].code;
+ 
+-			printf("Event: time %ld.%06ld, ", ev[i].time.tv_sec, ev[i].time.tv_usec);
++			printf("Event: time %ld.%06ld, ", ev[i].input_event_sec, ev[i].input_event_sec);
+ 
+ 			if (type == EV_SYN) {
+ 				if (code == SYN_MT_REPORT)
diff --git a/meta-oe/recipes-test/evtest/evtest_1.34.bb b/meta-oe/recipes-test/evtest/evtest_1.34.bb
index 3b6dc61408..a3a23c8951 100644
--- a/meta-oe/recipes-test/evtest/evtest_1.34.bb
+++ b/meta-oe/recipes-test/evtest/evtest_1.34.bb
@@ -8,8 +8,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 DEPENDS = "libxml2"
 
 SRCREV = "16e5104127a620686bdddc4a9ad62881134d6c69"
-SRC_URI = "git://anongit.freedesktop.org/evtest;protocol=git \
-           file://add_missing_limits_h_include.patch"
+SRC_URI = "git://gitlab.freedesktop.org/libevdev/evtest.git;protocol=https \
+           file://add_missing_limits_h_include.patch \
+           file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
+           "
 
 S = "${WORKDIR}/git"
 
-- 
2.24.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH 4/9] lirc: Fix build for 32bit arches with 64bit time_t
  2019-12-01 18:46 [meta-python][PATCH 1/9] python-evdev: Fix build for 32bit arches with 64bit time_t Khem Raj
  2019-12-01 18:46 ` [meta-oe][PATCH 2/9] x11vnc: " Khem Raj
  2019-12-01 18:46 ` [meta-oe][PATCH 3/9] evtest: " Khem Raj
@ 2019-12-01 18:46 ` Khem Raj
  2019-12-01 18:46 ` [meta-oe][PATCH 5/9] v4l-utils: Update to 1.18.0 Khem Raj
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2019-12-01 18:46 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ld-on-32bit-arches-with-64bit-time_t.patch | 40 +++++++++++++++++++
 .../recipes-connectivity/lirc/lirc_0.9.4d.bb  |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 meta-oe/recipes-connectivity/lirc/lirc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch

diff --git a/meta-oe/recipes-connectivity/lirc/lirc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-connectivity/lirc/lirc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 0000000000..0e38f7d8ec
--- /dev/null
+++ b/meta-oe/recipes-connectivity/lirc/lirc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
@@ -0,0 +1,40 @@
+From 50a48a7bd8d65a165ce2aac4ba0c1e02bded04aa Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Nov 2019 12:21:31 -0800
+Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
+
+time element is deprecated on new input_event structure in kernel's
+input.h [1]
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/devinput.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/devinput.c b/plugins/devinput.c
+index d4d733a..feb4a61 100644
+--- a/plugins/devinput.c
++++ b/plugins/devinput.c
+@@ -34,6 +34,11 @@
+ #include <linux/uinput.h>
+ #include <sys/stat.h>
+ 
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ #ifndef EV_SYN
+ /* previous name */
+ #define EV_SYN EV_RST
+@@ -459,7 +464,7 @@ char* devinput_rec(struct ir_remote* remotes)
+ 		return 0;
+ 	}
+ 
+-	log_trace("time %ld.%06ld  type %d  code %d  value %d", event.time.tv_sec, event.time.tv_usec, event.type,
++	log_trace("time %ld.%06ld  type %d  code %d  value %d", event.input_event_sec, event.input_event_usec, event.type,
+ 		  event.code, event.value);
+ 
+ 	value = (unsigned)event.value;
diff --git a/meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb b/meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb
index b13163debb..606caee892 100644
--- a/meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb
+++ b/meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb
@@ -13,6 +13,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2 \
     file://pollfd.patch \
+    file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
     file://lircd.service \
     file://lircd.init \
     file://lircexec.init \
-- 
2.24.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH 5/9] v4l-utils: Update to 1.18.0
  2019-12-01 18:46 [meta-python][PATCH 1/9] python-evdev: Fix build for 32bit arches with 64bit time_t Khem Raj
                   ` (2 preceding siblings ...)
  2019-12-01 18:46 ` [meta-oe][PATCH 4/9] lirc: " Khem Raj
@ 2019-12-01 18:46 ` Khem Raj
  2019-12-01 18:46 ` [meta-oe][PATCH 6/9] tslib: Fix build for 32bit arches with 64bit time_t Khem Raj
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2019-12-01 18:46 UTC (permalink / raw)
  To: openembedded-devel

- Fix build on 32bit arches with 64bit time_t
- Forward port patches

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...fine-error_t-and-include-sys-types.h.patch | 45 +++++++++++++++++++
 ...ld-on-32bit-arches-with-64bit-time_t.patch | 41 +++++++++++++++++
 ....patch => 0007-Do-not-use-getsubopt.patch} | 25 ++++++-----
 ...4l-utils_1.16.5.bb => v4l-utils_1.18.0.bb} |  8 ++--
 4 files changed, 104 insertions(+), 15 deletions(-)
 create mode 100644 meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch
 create mode 100644 meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch
 rename meta-oe/recipes-multimedia/v4l2apps/v4l-utils/{0003-v4l2-ctl-Do-not-use-getsubopt.patch => 0007-Do-not-use-getsubopt.patch} (56%)
 rename meta-oe/recipes-multimedia/v4l2apps/{v4l-utils_1.16.5.bb => v4l-utils_1.18.0.bb} (85%)

diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch
new file mode 100644
index 0000000000..57948add6e
--- /dev/null
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch
@@ -0,0 +1,45 @@
+From 137ce23ae677b11e5483ef810751edae7bf96bb9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Nov 2019 18:40:06 -0800
+Subject: [PATCH] Define error_t and include sys/types.h
+
+Fix 'unknown type name' for error_t and u_int32_t.
+u_int32_t is defined in sys/type.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ utils/ir-ctl/keymap.h   | 4 ++++
+ utils/keytable/keymap.h | 5 +++++
+ 2 files changed, 9 insertions(+)
+
+diff --git a/utils/ir-ctl/keymap.h b/utils/ir-ctl/keymap.h
+index f2b2963..1f8a3f8 100644
+--- a/utils/ir-ctl/keymap.h
++++ b/utils/ir-ctl/keymap.h
+@@ -2,6 +2,10 @@
+ #ifndef __KEYMAP_H
+ #define __KEYMAP_H
+ 
++#include <sys/types.h>
++#ifndef error_t
++typedef int error_t;
++#endif
+ struct keymap {
+ 	struct keymap *next;
+ 	char *name;
+diff --git a/utils/keytable/keymap.h b/utils/keytable/keymap.h
+index f2b2963..345d55d 100644
+--- a/utils/keytable/keymap.h
++++ b/utils/keytable/keymap.h
+@@ -2,6 +2,11 @@
+ #ifndef __KEYMAP_H
+ #define __KEYMAP_H
+ 
++#include <sys/types.h>
++#ifndef error_t
++typedef int error_t;
++#endif
++
+ struct keymap {
+ 	struct keymap *next;
+ 	char *name;
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 0000000000..a8926762ed
--- /dev/null
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch
@@ -0,0 +1,41 @@
+From b213da2d5fcc93cd24fc880c71c717d8e2ce2968 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Nov 2019 18:43:21 -0800
+Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
+
+time element is deprecated on new input_event structure in kernel's
+input.h [1]
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ utils/keytable/keytable.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
+index 6cb0217..59ff1ee 100644
+--- a/utils/keytable/keytable.c
++++ b/utils/keytable/keytable.c
+@@ -53,6 +53,11 @@
+ 
+ # define N_(string) string
+ 
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ struct input_keymap_entry_v2 {
+ #define KEYMAP_BY_INDEX	(1 << 0)
+ 	u_int8_t  flags;
+@@ -1533,7 +1538,7 @@ static void test_event(struct rc_device *rc_dev, int fd)
+ 
+ 		for (i = 0; i < rd / sizeof(struct input_event); i++) {
+ 			printf(_("%ld.%06ld: event type %s(0x%02x)"),
+-				ev[i].time.tv_sec, ev[i].time.tv_usec,
++				ev[i].input_event_sec, ev[i].input_event_usec,
+ 				get_event_name(events_type, ev[i].type), ev[i].type);
+ 
+ 			switch (ev[i].type) {
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0003-v4l2-ctl-Do-not-use-getsubopt.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0007-Do-not-use-getsubopt.patch
similarity index 56%
rename from meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0003-v4l2-ctl-Do-not-use-getsubopt.patch
rename to meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0007-Do-not-use-getsubopt.patch
index 5b84af2c32..ac704c72dc 100644
--- a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0003-v4l2-ctl-Do-not-use-getsubopt.patch
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0007-Do-not-use-getsubopt.patch
@@ -1,24 +1,26 @@
-From f7a4b79b3323534460a63b3e6c58ebaf06adf207 Mon Sep 17 00:00:00 2001
+From 4a10eab0e31d69948161241b1801c41201a5d081 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 14 Jul 2017 13:20:05 -0700
-Subject: [PATCH] v4l2-ctl: Do not use getsubopt
+Date: Sat, 30 Nov 2019 18:50:34 -0800
+Subject: [PATCH] Do not use getsubopt
 
 POSIX says that behavior when subopts list is empty is undefined.
 musl libs will set value to NULL which leads to crash.
 
-Taken from AlpineLinux
+Simply avoid getsubopt, since we cannot rely on it.
 
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Imported from Alpine Linux
 
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- utils/v4l2-ctl/v4l2-ctl-common.cpp | 19 ++++++++++---------
- 1 file changed, 10 insertions(+), 9 deletions(-)
+ utils/v4l2-ctl/v4l2-ctl-common.cpp | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
 
 diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
-index 3ea6cd3..291fb3e 100644
+index 651917e..cea57b7 100644
 --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
 +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
-@@ -692,16 +692,17 @@ static bool parse_subset(char *optarg)
+@@ -782,15 +782,17 @@ static bool parse_subset(char *optarg)
  
  static bool parse_next_subopt(char **subs, char **value)
  {
@@ -31,8 +33,7 @@ index 3ea6cd3..291fb3e 100644
  
 -	if (opt < 0 || *value)
 -		return false;
--	fprintf(stderr, "No value given to suboption <%s>\n",
--			subopts[opt]);
+-	fprintf(stderr, "Missing suboption value\n");
 -	return true;
 +	while (*p && *p != ',')
 +		p++;
@@ -44,4 +45,4 @@ index 3ea6cd3..291fb3e 100644
 +	return false;
  }
  
- void common_cmd(int ch, char *optarg)
+ void common_cmd(const std::string &media_bus_info, int ch, char *optarg)
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.16.5.bb b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.18.0.bb
similarity index 85%
rename from meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.16.5.bb
rename to meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.18.0.bb
index 415446844d..9cc2a8e5b4 100644
--- a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.16.5.bb
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.18.0.bb
@@ -20,10 +20,12 @@ SRC_URI = "http://linuxtv.org/downloads/v4l-utils/v4l-utils-${PV}.tar.bz2 \
            file://mediactl-pkgconfig.patch \
            file://export-mediactl-headers.patch \
            file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \
-           file://0003-v4l2-ctl-Do-not-use-getsubopt.patch \
+           file://0005-Define-error_t-and-include-sys-types.h.patch \
+           file://0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
+           file://0007-Do-not-use-getsubopt.patch \
            "
-SRC_URI[md5sum] = "de272817133c0dca000a78a5c8c8ec8b"
-SRC_URI[sha256sum] = "ed80242510385017a1dc566e17a285a77222bb301f5bc19386badfcc2c19df1b"
+SRC_URI[md5sum] = "18996bd5e9d83d47055c05de376708cd"
+SRC_URI[sha256sum] = "6cb60d822eeed20486a03cc23e0fc65956fbc1e85e0c1a7477f68bbd9802880d"
 
 EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev"
 
-- 
2.24.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH 6/9] tslib: Fix build for 32bit arches with 64bit time_t
  2019-12-01 18:46 [meta-python][PATCH 1/9] python-evdev: Fix build for 32bit arches with 64bit time_t Khem Raj
                   ` (3 preceding siblings ...)
  2019-12-01 18:46 ` [meta-oe][PATCH 5/9] v4l-utils: Update to 1.18.0 Khem Raj
@ 2019-12-01 18:46 ` Khem Raj
  2019-12-01 18:46 ` [meta-oe][PATCH 7/9] utouch-evemu, utouch-frame: " Khem Raj
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2019-12-01 18:46 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ld-on-32bit-arches-with-64bit-time_t.patch | 389 ++++++++++++++++++
 meta-oe/recipes-graphics/tslib/tslib_1.21.bb  |   1 +
 2 files changed, 390 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/tslib/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch

diff --git a/meta-oe/recipes-graphics/tslib/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-graphics/tslib/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 0000000000..59bd97a0f2
--- /dev/null
+++ b/meta-oe/recipes-graphics/tslib/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
@@ -0,0 +1,389 @@
+From 5455055660700be18eb8800e56e2423031ed4c76 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Nov 2019 19:59:29 -0800
+Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
+
+time element is deprecated on new input_event structure in kernel's
+input.h [1]
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
+
+Upstream-Status: Submitted [https://github.com/libts/tslib/pull/162]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/input-raw.c | 59 +++++++++++++++++++++++++++-------------
+ tools/ts_uinput.c   | 66 ++++++++++++++++++++++++++++++---------------
+ 2 files changed, 85 insertions(+), 40 deletions(-)
+
+diff --git a/plugins/input-raw.c b/plugins/input-raw.c
+index 64f0156..f030836 100644
+--- a/plugins/input-raw.c
++++ b/plugins/input-raw.c
+@@ -40,6 +40,11 @@
+ # include <linux/input.h>
+ #endif
+ 
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ #ifndef EV_SYN /* 2.4 kernel headers */
+ # define EV_SYN 0x00
+ #endif
+@@ -384,7 +389,8 @@ static int ts_input_read(struct tslib_module_info *inf,
+ 						samp->y = i->current_y;
+ 						samp->pressure = i->current_p;
+ 					}
+-					samp->tv = ev.time;
++					samp->tv.tv_sec = ev.input_event_sec;
++					samp->tv.tv_usec = ev.input_event_usec;
+ 			#ifdef DEBUG
+ 				fprintf(stderr,
+ 					"RAW---------------------> %d %d %d %ld.%ld\n",
+@@ -519,7 +525,8 @@ static int ts_input_read(struct tslib_module_info *inf,
+ 					samp->pressure = i->current_p = ev.value;
+ 					break;
+ 				}
+-				samp->tv = ev.time;
++				samp->tv.tv_sec = ev.input_event_sec;
++				samp->tv.tv_usec = ev.input_event_usec;
+ 	#ifdef DEBUG
+ 				fprintf(stderr,
+ 					"RAW---------------------------> %d %d %d\n",
+@@ -536,7 +543,8 @@ static int ts_input_read(struct tslib_module_info *inf,
+ 						samp->x = 0;
+ 						samp->y = 0;
+ 						samp->pressure = 0;
+-						samp->tv = ev.time;
++						samp->tv.tv_sec = ev.input_event_sec;
++						samp->tv.tv_usec = ev.input_event_usec;
+ 						samp++;
+ 						total++;
+ 					}
+@@ -651,7 +659,8 @@ static int ts_input_read_mt(struct tslib_module_info *inf,
+ 				switch (i->ev[it].code) {
+ 				case BTN_TOUCH:
+ 					i->buf[total][i->slot].pen_down = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					if (i->ev[it].value == 0)
+ 						pen_up = 1;
+@@ -751,7 +760,8 @@ static int ts_input_read_mt(struct tslib_module_info *inf,
+ 					// fall through
+ 				case ABS_MT_POSITION_X:
+ 					i->buf[total][i->slot].x = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					break;
+ 				case ABS_Y:
+@@ -760,7 +770,8 @@ static int ts_input_read_mt(struct tslib_module_info *inf,
+ 					// fall through
+ 				case ABS_MT_POSITION_Y:
+ 					i->buf[total][i->slot].y = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					break;
+ 				case ABS_PRESSURE:
+@@ -769,12 +780,14 @@ static int ts_input_read_mt(struct tslib_module_info *inf,
+ 					// fall through
+ 				case ABS_MT_PRESSURE:
+ 					i->buf[total][i->slot].pressure = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					break;
+ 				case ABS_MT_TOOL_X:
+ 					i->buf[total][i->slot].tool_x = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					/* for future use
+ 					 * i->buf[total][i->slot].valid |= TSLIB_MT_VALID_TOOL;
+@@ -782,7 +795,8 @@ static int ts_input_read_mt(struct tslib_module_info *inf,
+ 					break;
+ 				case ABS_MT_TOOL_Y:
+ 					i->buf[total][i->slot].tool_y = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					/* for future use
+ 					 * i->buf[total][i->slot].valid |= TSLIB_MT_VALID_TOOL;
+@@ -790,7 +804,8 @@ static int ts_input_read_mt(struct tslib_module_info *inf,
+ 					break;
+ 				case ABS_MT_TOOL_TYPE:
+ 					i->buf[total][i->slot].tool_type = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					/* for future use
+ 					 * i->buf[total][i->slot].valid |= TSLIB_MT_VALID_TOOL;
+@@ -798,12 +813,14 @@ static int ts_input_read_mt(struct tslib_module_info *inf,
+ 					break;
+ 				case ABS_MT_ORIENTATION:
+ 					i->buf[total][i->slot].orientation = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					break;
+ 				case ABS_MT_DISTANCE:
+ 					i->buf[total][i->slot].distance = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 
+ 					if (i->special_device == EGALAX_VERSION_210) {
+@@ -816,34 +833,40 @@ static int ts_input_read_mt(struct tslib_module_info *inf,
+ 					break;
+ 				case ABS_MT_BLOB_ID:
+ 					i->buf[total][i->slot].blob_id = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					break;
+ 				case ABS_MT_TOUCH_MAJOR:
+ 					i->buf[total][i->slot].touch_major = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					if (i->ev[it].value == 0)
+ 						i->buf[total][i->slot].pressure = 0;
+ 					break;
+ 				case ABS_MT_WIDTH_MAJOR:
+ 					i->buf[total][i->slot].width_major = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					break;
+ 				case ABS_MT_TOUCH_MINOR:
+ 					i->buf[total][i->slot].touch_minor = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					break;
+ 				case ABS_MT_WIDTH_MINOR:
+ 					i->buf[total][i->slot].width_minor = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					break;
+ 				case ABS_MT_TRACKING_ID:
+ 					i->buf[total][i->slot].tracking_id = i->ev[it].value;
+-					i->buf[total][i->slot].tv = i->ev[it].time;
++					i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec;
++					i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec;
+ 					i->buf[total][i->slot].valid |= TSLIB_MT_VALID;
+ 					if (i->ev[it].value == -1)
+ 						i->buf[total][i->slot].pressure = 0;
+diff --git a/tools/ts_uinput.c b/tools/ts_uinput.c
+index 6ca4c3d..1832a07 100644
+--- a/tools/ts_uinput.c
++++ b/tools/ts_uinput.c
+@@ -170,14 +170,16 @@ static int send_touch_events(struct data_t *data, struct ts_sample_mt **s,
+ 				continue;
+ 
+ 			if (s[j][i].pen_down == 1) {
+-				data->ev[c].time = s[j][i].tv;
++				data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++				data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 				data->ev[c].type = EV_KEY;
+ 				data->ev[c].code = BTN_TOUCH;
+ 				data->ev[c].value = s[j][i].pen_down;
+ 				c++;
+ 			}
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_SLOT;
+ 			data->ev[c].value = s[j][i].slot;
+@@ -190,111 +192,129 @@ static int send_touch_events(struct data_t *data, struct ts_sample_mt **s,
+ 			 * we should use slot 1 and so on.
+ 			 */
+ 			if (i == 0) {
+-				data->ev[c].time = s[j][i].tv;
++				data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++				data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 				data->ev[c].type = EV_ABS;
+ 				data->ev[c].code = ABS_X;
+ 				data->ev[c].value = s[j][i].x;
+ 				c++;
+ 
+-				data->ev[c].time = s[j][i].tv;
++				data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++				data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 				data->ev[c].type = EV_ABS;
+ 				data->ev[c].code = ABS_Y;
+ 				data->ev[c].value = s[j][i].y;
+ 				c++;
+ 
+-				data->ev[c].time = s[j][i].tv;
++				data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++				data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 				data->ev[c].type = EV_ABS;
+ 				data->ev[c].code = ABS_PRESSURE;
+ 				data->ev[c].value = s[j][i].pressure;
+ 				c++;
+ 			}
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_POSITION_X;
+ 			data->ev[c].value = s[j][i].x;
+ 			c++;
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_POSITION_Y;
+ 			data->ev[c].value = s[j][i].y;
+ 			c++;
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_PRESSURE;
+ 			data->ev[c].value = s[j][i].pressure;
+ 			c++;
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_TOUCH_MAJOR;
+ 			data->ev[c].value = s[j][i].touch_major;
+ 			c++;
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_WIDTH_MAJOR;
+ 			data->ev[c].value = s[j][i].width_major;
+ 			c++;
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_TOUCH_MINOR;
+ 			data->ev[c].value = s[j][i].touch_minor;
+ 			c++;
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_WIDTH_MINOR;
+ 			data->ev[c].value = s[j][i].width_minor;
+ 			c++;
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_TOOL_TYPE;
+ 			data->ev[c].value = s[j][i].tool_type;
+ 			c++;
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_TOOL_X;
+ 			data->ev[c].value = s[j][i].tool_x;
+ 			c++;
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_TOOL_Y;
+ 			data->ev[c].value = s[j][i].tool_y;
+ 			c++;
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_ORIENTATION;
+ 			data->ev[c].value = s[j][i].orientation;
+ 			c++;
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_DISTANCE;
+ 			data->ev[c].value = s[j][i].distance;
+ 			c++;
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_BLOB_ID;
+ 			data->ev[c].value = s[j][i].blob_id;
+ 			c++;
+ 
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_ABS;
+ 			data->ev[c].code = ABS_MT_TRACKING_ID;
+ 			data->ev[c].value = s[j][i].tracking_id;
+ 			c++;
+ 
+ 			if (data->mt_type_a == 1) {
+-				data->ev[c].time = s[j][i].tv;
++				data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++				data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 				data->ev[c].type = EV_SYN;
+ 				data->ev[c].code = SYN_MT_REPORT;
+ 				data->ev[c].value = 0;
+@@ -302,7 +322,8 @@ static int send_touch_events(struct data_t *data, struct ts_sample_mt **s,
+ 			}
+ 
+ 			if (s[j][i].pen_down == 0) {
+-				data->ev[c].time = s[j][i].tv;
++				data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++				data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 				data->ev[c].type = EV_KEY;
+ 				data->ev[c].code = BTN_TOUCH;
+ 				data->ev[c].value = s[j][i].pen_down;
+@@ -312,7 +333,8 @@ static int send_touch_events(struct data_t *data, struct ts_sample_mt **s,
+ 		}
+ 
+ 		if (c > 0) {
+-			data->ev[c].time = s[j][i].tv;
++			data->ev[c].input_event_sec = s[j][i].tv.tv_sec;
++			data->ev[c].input_event_usec = s[j][i].tv.tv_usec;
+ 			data->ev[c].type = EV_SYN;
+ 			data->ev[c].code = SYN_REPORT;
+ 			data->ev[c].value = 0;
+-- 
+2.24.0
+
diff --git a/meta-oe/recipes-graphics/tslib/tslib_1.21.bb b/meta-oe/recipes-graphics/tslib/tslib_1.21.bb
index 2bc40d9391..bb28ee410c 100644
--- a/meta-oe/recipes-graphics/tslib/tslib_1.21.bb
+++ b/meta-oe/recipes-graphics/tslib/tslib_1.21.bb
@@ -14,6 +14,7 @@ LIC_FILES_CHKSUM = "\
 "
 
 SRC_URI = "https://github.com/kergoth/tslib/releases/download/${PV}/tslib-${PV}.tar.xz;downloadfilename=tslib-${PV}.tar.xz \
+           file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
            file://ts.conf \
            file://tslib.sh \
 "
-- 
2.24.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH 7/9] utouch-evemu, utouch-frame: Fix build for 32bit arches with 64bit time_t
  2019-12-01 18:46 [meta-python][PATCH 1/9] python-evdev: Fix build for 32bit arches with 64bit time_t Khem Raj
                   ` (4 preceding siblings ...)
  2019-12-01 18:46 ` [meta-oe][PATCH 6/9] tslib: Fix build for 32bit arches with 64bit time_t Khem Raj
@ 2019-12-01 18:46 ` Khem Raj
  2019-12-01 18:46 ` [meta-oe][PATCH 8/9] directfb: " Khem Raj
  2019-12-01 18:46 ` [meta-oe][PATCH 9/9] kernel-module-emlog: Use compile task from module bbclass Khem Raj
  7 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2019-12-01 18:46 UTC (permalink / raw)
  To: openembedded-devel

Move patches from files/ directory into PN folders to avoid conflicts

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ld-on-32bit-arches-with-64bit-time_t.patch | 76 +++++++++++++++++++
 .../utouch/utouch-evemu_git.bb                |  4 +-
 ...ld-on-32bit-arches-with-64bit-time_t.patch | 41 ++++++++++
 ...tat.h-for-fixing-build-issue-on-musl.patch |  0
 .../remove-man-page-creation.patch            |  0
 .../utouch/utouch-frame_git.bb                |  1 +
 6 files changed, 121 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/utouch/utouch-evemu/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
 create mode 100644 meta-oe/recipes-support/utouch/utouch-frame/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
 rename meta-oe/recipes-support/utouch/{files => utouch-frame}/0001-include-sys-stat.h-for-fixing-build-issue-on-musl.patch (100%)
 rename meta-oe/recipes-support/utouch/{files => utouch-frame}/remove-man-page-creation.patch (100%)

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 @@
+From 60987a1df8eb8c9196222375574dcd7bc0ad2daa Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Nov 2019 20:23:27 -0800
+Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
+
+time element is deprecated on new input_event structure in kernel's
+input.h [1]
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/evemu-impl.h |  5 +++++
+ src/evemu.c      | 16 +++++++++-------
+ 2 files changed, 14 insertions(+), 7 deletions(-)
+
+diff --git a/src/evemu-impl.h b/src/evemu-impl.h
+index acf2976..c08d861 100644
+--- a/src/evemu-impl.h
++++ b/src/evemu-impl.h
+@@ -21,6 +21,11 @@
+ #include <evemu.h>
+ #include <linux/uinput.h>
+ 
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ #define EVPLAY_NBITS	KEY_CNT
+ #define EVPLAY_NBYTES	((EVPLAY_NBITS + 7) / 8)
+ 
+diff --git a/src/evemu.c b/src/evemu.c
+index 21187af..160c915 100644
+--- a/src/evemu.c
++++ b/src/evemu.c
+@@ -363,7 +363,7 @@ int evemu_read(struct evemu_device *dev, FILE *fp)
+ int evemu_write_event(FILE *fp, const struct input_event *ev)
+ {
+ 	return fprintf(fp, "E: %lu.%06u %04x %04x %d\n",
+-		       ev->time.tv_sec, (unsigned)ev->time.tv_usec,
++		       ev->input_event_sec, (unsigned)ev->input_event_usec,
+ 		       ev->type, ev->code, ev->value);
+ }
+ 
+@@ -391,8 +391,8 @@ int evemu_read_event(FILE *fp, struct input_event *ev)
+ 	int value;
+ 	int ret = fscanf(fp, "E: %lu.%06u %04x %04x %d\n",
+ 			 &sec, &usec, &type, &code, &value);
+-	ev->time.tv_sec = sec;
+-	ev->time.tv_usec = usec;
++	ev->input_event_sec = sec;
++	ev->input_event_usec = usec;
+ 	ev->type = type;
+ 	ev->code = code;
+ 	ev->value = value;
+@@ -411,12 +411,14 @@ int evemu_read_event_realtime(FILE *fp, struct input_event *ev,
+ 
+ 	if (evtime) {
+ 		if (!evtime->tv_sec)
+-			*evtime = ev->time;
+-		usec = 1000000L * (ev->time.tv_sec - evtime->tv_sec);
+-		usec += ev->time.tv_usec - evtime->tv_usec;
++			evtime->tv_sec = ev->input_event_sec;
++			evtime->tv_usec = ev->input_event_usec;
++		usec = 1000000L * (ev->input_event_sec - evtime->tv_sec);
++		usec += ev->input_event_usec - evtime->tv_usec;
+ 		if (usec > 500) {
+ 			usleep(usec);
+-			*evtime = ev->time;
++			evtime->tv_sec = ev->input_event_sec;
++			evtime->tv_usec = ev->input_event_usec;
+ 		}
+ 	}
+ 
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"
 
 inherit autotools
 
-SRC_URI = "git://bitmath.org/git/evemu.git;protocol=http"
+SRC_URI = "git://bitmath.org/git/evemu.git;protocol=http \
+           file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
+           "
 SRCREV = "9752b50e922572e4cd214ac45ed95e4ee410fe24"
 
 PV = "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 @@
+From 895b6996e232700fb2a428838feaef418cc64b70 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Nov 2019 22:52:13 -0800
+Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
+
+time element is deprecated on new input_event structure in kernel's
+input.h [1]
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/frame-mtdev.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/frame-mtdev.c b/src/frame-mtdev.c
+index c0f15d8..42ad380 100644
+--- a/src/frame-mtdev.c
++++ b/src/frame-mtdev.c
+@@ -25,6 +25,11 @@
+ #include <errno.h>
+ #include <math.h>
+ 
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ static int is_pointer(const struct evemu_device *dev)
+ {
+ 	return evemu_has_event(dev, EV_REL, REL_X) ||
+@@ -200,7 +205,7 @@ static int handle_abs_event(utouch_frame_handle fh,
+ static utouch_frame_time_t get_evtime_ms(const struct input_event *syn)
+ {
+ 	static const utouch_frame_time_t ms = 1000;
+-	return syn->time.tv_usec / ms + syn->time.tv_sec * ms;
++	return syn->input_event_usec / ms + syn->input_event_sec * ms;
+ }
+ 
+ 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
similarity index 100%
rename from meta-oe/recipes-support/utouch/files/0001-include-sys-stat.h-for-fixing-build-issue-on-musl.patch
rename to 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
similarity index 100%
rename from meta-oe/recipes-support/utouch/files/remove-man-page-creation.patch
rename to 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
 SRC_URI = "git://bitmath.org/git/frame.git;protocol=http \
            file://remove-man-page-creation.patch \
            file://0001-include-sys-stat.h-for-fixing-build-issue-on-musl.patch \
+           file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
            "
 SRCREV = "95363d5a1f7394d71144bf3b408ef4e6db4350fc"
 
-- 
2.24.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH 8/9] directfb: Fix build for 32bit arches with 64bit time_t
  2019-12-01 18:46 [meta-python][PATCH 1/9] python-evdev: Fix build for 32bit arches with 64bit time_t Khem Raj
                   ` (5 preceding siblings ...)
  2019-12-01 18:46 ` [meta-oe][PATCH 7/9] utouch-evemu, utouch-frame: " Khem Raj
@ 2019-12-01 18:46 ` Khem Raj
  2019-12-01 18:46 ` [meta-oe][PATCH 9/9] kernel-module-emlog: Use compile task from module bbclass Khem Raj
  7 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2019-12-01 18:46 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../recipes-graphics/directfb/directfb.inc    |   3 +-
 ...ld-on-32bit-arches-with-64bit-time_t.patch | 139 ++++++++++++++++++
 2 files changed, 141 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-graphics/directfb/directfb/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch

diff --git a/meta-oe/recipes-graphics/directfb/directfb.inc b/meta-oe/recipes-graphics/directfb/directfb.inc
index 96aa31117f..65fd89e6fe 100644
--- a/meta-oe/recipes-graphics/directfb/directfb.inc
+++ b/meta-oe/recipes-graphics/directfb/directfb.inc
@@ -21,7 +21,8 @@ SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/DirectFB-${PV}.tar.g
            file://use-PTHREAD_MUTEX_RECURSIVE.patch \
            file://fix-client-gfx_state-initialisation.patch \
            file://fix-tslib-version-check.patch \
-          "
+           file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
+           "
 
 S = "${WORKDIR}/DirectFB-${PV}"
 
diff --git a/meta-oe/recipes-graphics/directfb/directfb/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-graphics/directfb/directfb/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 0000000000..2f766465e1
--- /dev/null
+++ b/meta-oe/recipes-graphics/directfb/directfb/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
@@ -0,0 +1,139 @@
+From 0b66557f2e924023b12006b58d8e86149c745aed Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Nov 2019 20:34:33 -0800
+Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
+
+time element is deprecated on new input_event structure in kernel's
+input.h [1]
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ inputdrivers/linux_input/linux_input.c | 36 ++++++++++++++++++--------
+ 1 file changed, 25 insertions(+), 11 deletions(-)
+
+diff --git a/inputdrivers/linux_input/linux_input.c b/inputdrivers/linux_input/linux_input.c
+index 7e9a6ad..03deebc 100644
+--- a/inputdrivers/linux_input/linux_input.c
++++ b/inputdrivers/linux_input/linux_input.c
+@@ -42,6 +42,11 @@ typedef unsigned long kernel_ulong_t;
+ 
+ #include <linux/input.h>
+ 
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ #ifndef KEY_OK
+ /* Linux kernel 2.5.42+ defines additional keys in linux/input.h */
+ #include "input_fake.h"
+@@ -754,7 +759,8 @@ translate_event( const LinuxInputData     *data,
+                  DFBInputEvent            *devt )
+ {
+      devt->flags     = DIEF_TIMESTAMP;
+-     devt->timestamp = levt->time;
++     devt->timestamp.tv_sec = levt->input_event_sec;
++     devt->timestamp.tv_usec = levt->input_event_usec;
+ 
+      switch (levt->type) {
+           case EV_KEY:
+@@ -2139,7 +2145,8 @@ touchpad_translate( struct touchpad_fsm_state *state,
+      int abs, rel;
+ 
+      devt->flags     = DIEF_TIMESTAMP | (dfb_config->linux_input_touch_abs ? DIEF_AXISABS : DIEF_AXISREL);
+-     devt->timestamp = levt->time;
++     devt->timestamp.tv_sec = levt->input_event_sec;
++     devt->timestamp.tv_usec = levt->input_event_usec;
+      devt->type      = DIET_AXISMOTION;
+ 
+      switch (levt->code) {
+@@ -2204,7 +2211,7 @@ touchpad_fsm( struct touchpad_fsm_state *state,
+               DFBInputEvent             *devt )
+ {
+      struct timeval timeout = { 0, 125000 };
+-
++     struct timeval tval;
+      /* select() timeout? */
+      if (!levt) {
+           /* Check if button release is due. */
+@@ -2223,6 +2230,8 @@ touchpad_fsm( struct touchpad_fsm_state *state,
+           return 0;
+      }
+ 
++     tval.tv_sec = levt->input_event_sec;
++     tval.tv_usec = levt->input_event_usec;
+      /* More or less ignore these events for now */
+      if ((levt->type == EV_SYN && levt->code == SYN_REPORT) ||
+          (levt->type == EV_ABS && levt->code == ABS_PRESSURE) ||
+@@ -2233,7 +2242,7 @@ touchpad_fsm( struct touchpad_fsm_state *state,
+ 
+           /* Check if button release is due. */
+           if (state->fsm_state == TOUCHPAD_FSM_DRAG_START &&
+-              timeout_passed( &state->timeout, &levt->time )) {
++              timeout_passed( &state->timeout, &tval )) {
+                devt->flags     = DIEF_TIMESTAMP;
+                devt->timestamp = state->timeout; /* timeout of levt->time? */
+                devt->type      = DIET_BUTTONRELEASE;
+@@ -2255,7 +2264,8 @@ touchpad_fsm( struct touchpad_fsm_state *state,
+      case TOUCHPAD_FSM_START:
+           if (touchpad_finger_landing( levt )) {
+                state->fsm_state = TOUCHPAD_FSM_MAIN;
+-               state->timeout = levt->time;
++               state->timeout.tv_sec = levt->input_event_sec;
++               state->timeout.tv_usec = levt->input_event_usec;
+                timeout_add( &state->timeout, &timeout );
+           }
+           return 0;
+@@ -2268,15 +2278,17 @@ touchpad_fsm( struct touchpad_fsm_state *state,
+                }
+           }
+           else if (touchpad_finger_leaving( levt )) {
+-               if (!timeout_passed( &state->timeout, &levt->time )) {
++               if (!timeout_passed( &state->timeout, &tval )) {
+                     devt->flags     = DIEF_TIMESTAMP;
+-                    devt->timestamp = levt->time;
++                    devt->timestamp.tv_sec = levt->input_event_sec;
++                    devt->timestamp.tv_usec = levt->input_event_usec;
+                     devt->type      = DIET_BUTTONPRESS;
+                     devt->button    = DIBI_FIRST;
+ 
+                     touchpad_fsm_init( state );
+                     state->fsm_state = TOUCHPAD_FSM_DRAG_START;
+-                    state->timeout = levt->time;
++                    state->timeout.tv_sec = levt->input_event_sec;
++                    state->timeout.tv_usec = levt->input_event_usec;
+                     timeout_add( &state->timeout, &timeout );
+                     return 1;
+                }
+@@ -2287,7 +2299,7 @@ touchpad_fsm( struct touchpad_fsm_state *state,
+           return 0;
+ 
+      case TOUCHPAD_FSM_DRAG_START:
+-          if (timeout_passed( &state->timeout, &levt->time )){
++          if (timeout_passed( &state->timeout, &tval )){
+                devt->flags     = DIEF_TIMESTAMP;
+                devt->timestamp = state->timeout; /* timeout of levt->time? */
+                devt->type      = DIET_BUTTONRELEASE;
+@@ -2299,7 +2311,8 @@ touchpad_fsm( struct touchpad_fsm_state *state,
+           else {
+                if (touchpad_finger_landing( levt )) {
+                     state->fsm_state = TOUCHPAD_FSM_DRAG_MAIN;
+-                    state->timeout = levt->time;
++                    state->timeout.tv_sec = levt->input_event_sec;
++                    state->timeout.tv_usec = levt->input_event_usec;
+                     timeout_add( &state->timeout, &timeout );
+                }
+           }
+@@ -2314,7 +2327,8 @@ touchpad_fsm( struct touchpad_fsm_state *state,
+           }
+           else if (touchpad_finger_leaving( levt )) {
+                devt->flags     = DIEF_TIMESTAMP;
+-               devt->timestamp = levt->time;
++               devt->timestamp.tv_sec = levt->input_event_sec;
++               devt->timestamp.tv_usec = levt->input_event_usec;
+                devt->type      = DIET_BUTTONRELEASE;
+                devt->button    = DIBI_FIRST;
+ 
-- 
2.24.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH 9/9] kernel-module-emlog: Use compile task from module bbclass
  2019-12-01 18:46 [meta-python][PATCH 1/9] python-evdev: Fix build for 32bit arches with 64bit time_t Khem Raj
                   ` (6 preceding siblings ...)
  2019-12-01 18:46 ` [meta-oe][PATCH 8/9] directfb: " Khem Raj
@ 2019-12-01 18:46 ` Khem Raj
  7 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2019-12-01 18:46 UTC (permalink / raw)
  To: openembedded-devel

This ensures that right CC/LD is used when building the module, which
should be KERNEL_CC and KERNEL_LD, otherwise it starts to use DISTRO
default ld and cc which could be non-gcc and non-bfd liker which is must
for building kernel and modules

Also hides a gold linker failure seen on aarch64

| aarch64-yoe-linux-musl-ld: internal error in set_address, at ../../gold/output.h:322

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Fabio Berton <fabio.berton@ossystems.com.br>
---
 meta-oe/recipes-core/emlog/kernel-module-emlog_git.bb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/meta-oe/recipes-core/emlog/kernel-module-emlog_git.bb b/meta-oe/recipes-core/emlog/kernel-module-emlog_git.bb
index 51f7226ebd..a554a4c947 100644
--- a/meta-oe/recipes-core/emlog/kernel-module-emlog_git.bb
+++ b/meta-oe/recipes-core/emlog/kernel-module-emlog_git.bb
@@ -7,6 +7,4 @@ EXTRA_OEMAKE += " \
     KVER=${KERNEL_VERSION} \
 "
 
-do_compile() {
-    oe_runmake modules
-}
+MAKE_TARGETS = "modules"
-- 
2.24.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-12-01 18:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-01 18:46 [meta-python][PATCH 1/9] python-evdev: Fix build for 32bit arches with 64bit time_t Khem Raj
2019-12-01 18:46 ` [meta-oe][PATCH 2/9] x11vnc: " Khem Raj
2019-12-01 18:46 ` [meta-oe][PATCH 3/9] evtest: " Khem Raj
2019-12-01 18:46 ` [meta-oe][PATCH 4/9] lirc: " Khem Raj
2019-12-01 18:46 ` [meta-oe][PATCH 5/9] v4l-utils: Update to 1.18.0 Khem Raj
2019-12-01 18:46 ` [meta-oe][PATCH 6/9] tslib: Fix build for 32bit arches with 64bit time_t Khem Raj
2019-12-01 18:46 ` [meta-oe][PATCH 7/9] utouch-evemu, utouch-frame: " Khem Raj
2019-12-01 18:46 ` [meta-oe][PATCH 8/9] directfb: " Khem Raj
2019-12-01 18:46 ` [meta-oe][PATCH 9/9] kernel-module-emlog: Use compile task from module bbclass Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.