Skip to contentSkip to conversation

python-evdev: Fix build for 32bit arches with 64bit time_t

PATCH New Khem Raj 1 participant 9 messages Dec 1, 2019

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/9 python-evdev: Fix build for 32bit arches with 64bit time_t

---
 .../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
meta-python/recipes-devtools/python/python-evdev.inc +4 -0
index 953094ba74..a536815358 100644
@@ -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"
 
meta-python/recipes-devtools/python/python-evdev/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file +83 -0

83 lines not on this page · raw message

Signature · 1 line
2.24.0
author
#1 lore raw

PATCH 2/9 x11vnc: Fix build for 32bit arches with 64bit time_t

---
 ...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
meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file +111 -0
new file mode 100644
index 0000000000..d44445fa9f
@@ -0,0 +1,111 @@
+From 8ab672ccc67b64058cffac2cd19a0d3b75d5aa25 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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;
meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb +3 -2
index d0c9f774fe..0d84c420a1 100644
@@ -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 = "\
Signature · 1 line
2.24.0
author
#2 lore raw

PATCH 3/9 evtest: Fix build for 32bit arches with 64bit time_t

In reply to Khem Raj
---
 ...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
meta-oe/recipes-test/evtest/evtest/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file +41 -0
new file mode 100644
index 0000000000..706322d565
@@ -0,0 +1,41 @@
+From fa57c78c33d26084f85f1a6b4c29378631dc9395 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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)
meta-oe/recipes-test/evtest/evtest_1.34.bb +4 -2
index 3b6dc61408..a3a23c8951 100644
@@ -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"
 
Signature · 1 line
2.24.0
author
#3 lore raw

PATCH 4/9 lirc: Fix build for 32bit arches with 64bit time_t

In reply to Khem Raj
---
 ...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
meta-oe/recipes-connectivity/lirc/lirc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file +40 -0
new file mode 100644
index 0000000000..0e38f7d8ec
@@ -0,0 +1,40 @@
+From 50a48a7bd8d65a165ce2aac4ba0c1e02bded04aa Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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;
meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb +1 -0
index b13163debb..606caee892 100644
@@ -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 \
Signature · 1 line
2.24.0
author
#4 lore raw

PATCH 5/9 v4l-utils: Update to 1.18.0

In reply to Khem Raj

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

---
 ...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%)
meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch new file +45 -0
new file mode 100644
index 0000000000..57948add6e
@@ -0,0 +1,45 @@
+From 137ce23ae677b11e5483ef810751edae7bf96bb9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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;
meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file +41 -0

41 lines not on this page · raw message

meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0007-Do-not-use-getsubopt.patch renamed from meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0003-v4l2-ctl-Do-not-use-getsubopt.patch +13 -12
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
@@ -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 <[email protected]>
-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 <[email protected]>
+Imported from Alpine Linux
 
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
 ---
- 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)
meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.18.0.bb renamed from meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.16.5.bb +5 -3
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
@@ -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"
 
Signature · 1 line
2.24.0
author
#5 lore raw

PATCH 6/9 tslib: Fix build for 32bit arches with 64bit time_t

In reply to Khem Raj
---
 ...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
meta-oe/recipes-graphics/tslib/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file +389 -0
new file mode 100644
index 0000000000..59bd97a0f2
@@ -0,0 +1,389 @@
+From 5455055660700be18eb8800e56e2423031ed4c76 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta-oe/recipes-graphics/tslib/tslib_1.21.bb +1 -0
index 2bc40d9391..bb28ee410c 100644
@@ -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 \
 "
Signature · 1 line
2.24.0
author
#6 lore raw

PATCH 7/9 utouch-evemu, utouch-frame: Fix build for 32bit arches with 64bit time_t

In reply to Khem Raj

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

---
 ...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%)
meta-oe/recipes-support/utouch/utouch-evemu/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file +76 -0
new file mode 100644
index 0000000000..71bf572699
@@ -0,0 +1,76 @@
+From 60987a1df8eb8c9196222375574dcd7bc0ad2daa Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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;
+ 		}
+ 	}
+ 
meta-oe/recipes-support/utouch/utouch-evemu_git.bb +3 -1
index 1dd5a86d50..41d1cbfd97 100644
@@ -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}"
meta-oe/recipes-support/utouch/utouch-frame/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file +41 -0

41 lines not on this page · raw message

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 -0
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
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 -0
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
meta-oe/recipes-support/utouch/utouch-frame_git.bb +1 -0
index 39d46af8e9..1ebebfa9f5 100644
@@ -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"
 
Signature · 1 line
2.24.0
author
#7 lore raw

PATCH 8/9 directfb: Fix build for 32bit arches with 64bit time_t

In reply to Khem Raj
---
 .../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
meta-oe/recipes-graphics/directfb/directfb.inc +2 -1
index 96aa31117f..65fd89e6fe 100644
@@ -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}"
 
meta-oe/recipes-graphics/directfb/directfb/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file +139 -0

139 lines not on this page · raw message

Signature · 1 line
2.24.0
author
#8 lore raw

PATCH 9/9 kernel-module-emlog: Use compile task from module bbclass

In reply to Khem Raj

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

Cc Fabio Berton <[email protected]>
---
 meta-oe/recipes-core/emlog/kernel-module-emlog_git.bb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
meta-oe/recipes-core/emlog/kernel-module-emlog_git.bb +1 -3
index 51f7226ebd..a554a4c947 100644
@@ -7,6 +7,4 @@ EXTRA_OEMAKE += " \
     KVER=${KERNEL_VERSION} \
 "
 
-do_compile() {
-    oe_runmake modules
-}
+MAKE_TARGETS = "modules"
Signature · 1 line
2.24.0