package/mtdev2tuio: fix build with musl 1.2.0
PATCH 1/1 package/mtdev2tuio: fix build with musl 1.2.0
Fixes:
- http://autobuild.buildroot.org/results/a30823f1388f37820d8a4f29b9b2c1de9b3992ac
--- ...dev2tuio.c-fix-build-with-musl-1.2.0.patch | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 package/mtdev2tuio/0002-mtdev2tuio.c-fix-build-with-musl-1.2.0.patch
package/mtdev2tuio/0002-mtdev2tuio.c-fix-build-with-musl-1.2.0.patch new file +57 -0
@@ -0,0 +1,57 @@ +From 6fb492ba72b4ecbe5ebba44647e838fb998ee061 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Sat, 25 Apr 2020 12:19:32 +0200 +Subject: [PATCH] mtdev2tuio.c: fix build with musl 1.2.0 + +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: Fabrice Fontaine <[email protected]> +[Upstream status: https://github.com/olivopaolo/mtdev2tuio/pull/6] +--- + mtdev2tuio.c | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/mtdev2tuio.c b/mtdev2tuio.c +index 3a9174f..fced70c 100644 +--- a/mtdev2tuio.c ++++ b/mtdev2tuio.c +@@ -47,8 +47,13 @@ + + typedef __u64 nstime; + +-static inline __u64 timeval_to_ns(const struct timeval *tv) { +- return ((__u64) tv->tv_sec * NSEC_PER_SEC) + tv->tv_usec * NSEC_PER_USEC ; ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ ++static inline __u64 timeval_to_ns(const struct input_event *ev) { ++ return ((__u64) ev->input_event_sec * NSEC_PER_SEC) + ev->input_event_usec * NSEC_PER_USEC ; + } + + static float calc_speed(float s, float s_1, nstime t, nstime t_1) { +@@ -159,7 +164,7 @@ static void process_event(struct state_t *s, struct device_t *d, const struct in + case ABS_MT_POSITION_X: + s->slot[s->cs].x_1 = s->slot[s->cs].x ; + s->slot[s->cs].x = (ev->value - d->x_ofs) * d->x_scale ; +- time = timeval_to_ns(&ev->time) ; ++ time = timeval_to_ns(ev) ; + s->slot[s->cs].X = calc_speed(s->slot[s->cs].x, s->slot[s->cs].x_1, time, s->slot[s->cs].t_x) ; + s->slot[s->cs].t_x = time ; + // this slot has been changed +@@ -168,7 +173,7 @@ static void process_event(struct state_t *s, struct device_t *d, const struct in + case ABS_MT_POSITION_Y : + s->slot[s->cs].y_1 = s->slot[s->cs].y ; + s->slot[s->cs].y = (ev->value - d->y_ofs) * d->y_scale ; +- time = timeval_to_ns(&ev->time) ; ++ time = timeval_to_ns(ev) ; + s->slot[s->cs].Y = calc_speed(s->slot[s->cs].y, s->slot[s->cs].y_1, time, s->slot[s->cs].t_y) ; + s->slot[s->cs].t_y = time ; + // this slot has been changed +-- +2.25.1 +
Signature · 1 line
2.25.1
Thomas Petazzoni
AppliedPATCH 1/1 package/mtdev2tuio: fix build with musl 1.2.0
Quoted 8 lines · On Sat, 25 Apr 2020 12:48:16 +0200 Fabrice Fontaine…
Fixes:
- http://autobuild.buildroot.org/results/a30823f1388f37820d8a4f29b9b2c1de9b3992acSigned-off-by Fabrice Fontaine <[email protected]>--- ...dev2tuio.c-fix-build-with-musl-1.2.0.patch | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 package/mtdev2tuio/0002-mtdev2tuio.c-fix-build-with-musl-1.2.0.patch
Applied to master, thanks. However, this project hasn't seen any commit since 2012. Is it still relevant/useful ?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/mtdev2tuio: fix build with musl 1.2.0
Hello Thomas, Fabrice,
once upon a time I added mtdev2tuio because at the time it was useful in multitouch szenarios. I do not use it any more.
@Fabrice: Since you seems to have adopted mtdev2tuio, do you use it? If yes, could you please put yourself in the developer list instead of me?
If not, I could volunteer to remove it since it is not maintained and it breaks builds every now and then.
Kind regards
Stephan
Am 25.04.20 um 22:16 schrieb Thomas Petazzoni:
Quoted 15 lines
Quoted 8 lines · On Sat, 25 Apr 2020 12:48:16 +0200 Fabrice Fontaine…
Fixes:
- http://autobuild.buildroot.org/results/a30823f1388f37820d8a4f29b9b2c1de9b3992acSigned-off-by Fabrice Fontaine <[email protected]>--- ...dev2tuio.c-fix-build-with-musl-1.2.0.patch | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 package/mtdev2tuio/0002-mtdev2tuio.c-fix-build-with-musl-1.2.0.patchApplied to master, thanks. However, this project hasn't seen any commit since 2012. Is it still relevant/useful ?
Thomas
PATCH 1/1 package/mtdev2tuio: fix build with musl 1.2.0
Hello Stephan,
Le sam. 9 mai 2020 ? 14:58, Stephan Hoffmann <[email protected]> a ?crit :
Quoted 11 lines
Hello Thomas, Fabrice,
once upon a time I added mtdev2tuio because at the time it was useful in multitouch szenarios. I do not use it any more.
@Fabrice: Since you seems to have adopted mtdev2tuio, do you use it? If yes, could you please put yourself in the developer list instead of me?
If not, I could volunteer to remove it since it is not maintained and it breaks builds every now and then.
You can remove it, I don't use mtdev2tuio.
Quoted 21 lines
Kind regards
Stephan
Am 25.04.20 um 22:16 schrieb Thomas Petazzoni:
Quoted 15 lines
Quoted 8 lines · On Sat, 25 Apr 2020 12:48:16 +0200 Fabrice Fontaine…
Fixes:
- http://autobuild.buildroot.org/results/a30823f1388f37820d8a4f29b9b2c1de9b3992acSigned-off-by Fabrice Fontaine <[email protected]>--- ...dev2tuio.c-fix-build-with-musl-1.2.0.patch | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 package/mtdev2tuio/0002-mtdev2tuio.c-fix-build-with-musl-1.2.0.patchApplied to master, thanks. However, this project hasn't seen any commit since 2012. Is it still relevant/useful ?
Thomas
Best Regards,
Fabrice