aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe PRIOUZEAU <christophe.priouzeau@st.com>2020-04-20 07:10:29 +0000
committerKhem Raj <raj.khem@gmail.com>2020-04-20 09:59:08 -0700
commit85d6bc79a566ab871c7ce49693d728c29dfe9e8f (patch)
treea323989f7324255affe5a26da61e77f82f0c4ff5
parent394b64e95a358f622342c25bbef9d85830048c7f (diff)
downloadmeta-openembedded-contrib-85d6bc79a566ab871c7ce49693d728c29dfe9e8f.tar.gz
utouch-evemu: correct Fix build for 32bit arches with 64bit time_t
A pair of parenthesis are missing on correction which generate bad behaviour at runtime. Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/utouch/utouch-evemu/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch15
1 files changed, 9 insertions, 6 deletions
diff --git a/meta-oe/recipes-support/utouch/utouch-evemu/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-support/utouch/utouch-evemu/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
index 71bf572699..7cfd470430 100644
--- 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
@@ -12,8 +12,8 @@ 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(-)
+ src/evemu.c | 20 ++++++++++++--------
+ 2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/src/evemu-impl.h b/src/evemu-impl.h
index acf2976..c08d861 100644
@@ -32,7 +32,7 @@ index acf2976..c08d861 100644
#define EVPLAY_NBYTES ((EVPLAY_NBITS + 7) / 8)
diff --git a/src/evemu.c b/src/evemu.c
-index 21187af..160c915 100644
+index 21187af..7489449 100644
--- a/src/evemu.c
+++ b/src/evemu.c
@@ -363,7 +363,7 @@ int evemu_read(struct evemu_device *dev, FILE *fp)
@@ -55,16 +55,19 @@ index 21187af..160c915 100644
ev->type = type;
ev->code = code;
ev->value = value;
-@@ -411,12 +411,14 @@ int evemu_read_event_realtime(FILE *fp, struct input_event *ev,
+@@ -410,13 +411,16 @@ int evemu_read_event_realtime(FILE *fp, struct input_event *ev,
+ return ret;
if (evtime) {
- if (!evtime->tv_sec)
+- if (!evtime->tv_sec)
- *evtime = ev->time;
- usec = 1000000L * (ev->time.tv_sec - evtime->tv_sec);
- usec += ev->time.tv_usec - evtime->tv_usec;
++ if (!evtime->tv_sec) {
+ 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_sec - evtime->tv_sec) * 1000000L;
+ usec += ev->input_event_usec - evtime->tv_usec;
if (usec > 500) {
usleep(usec);