aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-04-25 11:30:55 -0700
committerKhem Raj <raj.khem@gmail.com>2020-04-25 11:32:27 -0700
commit920161113533074d27dc93c521815380fdf20275 (patch)
tree043d025d6c36ea1f13938833f429af32312b49a2
parentf663e842bb0a24cbb5a0bde2842061fad2d579ce (diff)
downloadmeta-openembedded-contrib-920161113533074d27dc93c521815380fdf20275.tar.gz
tslib: Fix build with 4.x kernel headers
Fixes | ../../tslib-1.21/tools/ts_uinput.c:337:15: error: 'struct input_event' has no member named 'input_event_usec' | 337 | data->ev[c].input_event_usec = s[j][i].tv.tv_usec; | | ^ Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-graphics/tslib/tslib/0001-Fix-build-error-with-input_event_sec-for-old-kernel.patch30
-rw-r--r--meta-oe/recipes-graphics/tslib/tslib_1.21.bb1
2 files changed, 31 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/tslib/tslib/0001-Fix-build-error-with-input_event_sec-for-old-kernel.patch b/meta-oe/recipes-graphics/tslib/tslib/0001-Fix-build-error-with-input_event_sec-for-old-kernel.patch
new file mode 100644
index 0000000000..ea8a9e5651
--- /dev/null
+++ b/meta-oe/recipes-graphics/tslib/tslib/0001-Fix-build-error-with-input_event_sec-for-old-kernel.patch
@@ -0,0 +1,30 @@
+From 050bf24c16e95f63a76e13156346a072035d45b4 Mon Sep 17 00:00:00 2001
+From: Evan Harvey <evanwork1234@gmail.com>
+Date: Thu, 19 Mar 2020 01:32:03 -0700
+Subject: [PATCH] Fix build error with input_event_sec for old kernel
+
+Upstream-Status: Backport [https://github.com/libts/tslib/commit/050bf24c16e95f63a76e13156346a072035d45b4]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tools/ts_uinput.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/tools/ts_uinput.c b/tools/ts_uinput.c
+index 1832a07..9c40bb3 100644
+--- a/tools/ts_uinput.c
++++ b/tools/ts_uinput.c
+@@ -51,6 +51,11 @@
+ #include <linux/fb.h>
+ #endif
+
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ #define RESET "\033[0m"
+ #define RED "\033[31m"
+ #define GREEN "\033[32m"
+--
+2.26.2
+
diff --git a/meta-oe/recipes-graphics/tslib/tslib_1.21.bb b/meta-oe/recipes-graphics/tslib/tslib_1.21.bb
index bb28ee410c..76c4231441 100644
--- a/meta-oe/recipes-graphics/tslib/tslib_1.21.bb
+++ b/meta-oe/recipes-graphics/tslib/tslib_1.21.bb
@@ -15,6 +15,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://0001-Fix-build-error-with-input_event_sec-for-old-kernel.patch \
file://ts.conf \
file://tslib.sh \
"