All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/mtdev2tuio: fix build with musl 1.2.0
@ 2020-04-25 10:48 Fabrice Fontaine
  2020-04-25 20:16 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Fontaine @ 2020-04-25 10:48 UTC (permalink / raw)
  To: buildroot

Fixes:
 - http://autobuild.buildroot.org/results/a30823f1388f37820d8a4f29b9b2c1de9b3992ac

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...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

diff --git a/package/mtdev2tuio/0002-mtdev2tuio.c-fix-build-with-musl-1.2.0.patch b/package/mtdev2tuio/0002-mtdev2tuio.c-fix-build-with-musl-1.2.0.patch
new file mode 100644
index 0000000000..24ceff52ee
--- /dev/null
+++ b/package/mtdev2tuio/0002-mtdev2tuio.c-fix-build-with-musl-1.2.0.patch
@@ -0,0 +1,57 @@
+From 6fb492ba72b4ecbe5ebba44647e838fb998ee061 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+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 <fontaine.fabrice@gmail.com>
+[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
+
-- 
2.25.1

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

* [Buildroot] [PATCH 1/1] package/mtdev2tuio: fix build with musl 1.2.0
  2020-04-25 10:48 [Buildroot] [PATCH 1/1] package/mtdev2tuio: fix build with musl 1.2.0 Fabrice Fontaine
@ 2020-04-25 20:16 ` Thomas Petazzoni
  2020-05-09 12:58   ` Stephan Hoffmann
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2020-04-25 20:16 UTC (permalink / raw)
  To: buildroot

On Sat, 25 Apr 2020 12:48:16 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fixes:
>  - http://autobuild.buildroot.org/results/a30823f1388f37820d8a4f29b9b2c1de9b3992ac
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...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
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1/1] package/mtdev2tuio: fix build with musl 1.2.0
  2020-04-25 20:16 ` Thomas Petazzoni
@ 2020-05-09 12:58   ` Stephan Hoffmann
  2020-05-09 14:08     ` Fabrice Fontaine
  0 siblings, 1 reply; 4+ messages in thread
From: Stephan Hoffmann @ 2020-05-09 12:58 UTC (permalink / raw)
  To: buildroot

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:
> On Sat, 25 Apr 2020 12:48:16 +0200
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
>> Fixes:
>>  - http://autobuild.buildroot.org/results/a30823f1388f37820d8a4f29b9b2c1de9b3992ac
>>
>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>> ---
>>  ...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

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

* [Buildroot] [PATCH 1/1] package/mtdev2tuio: fix build with musl 1.2.0
  2020-05-09 12:58   ` Stephan Hoffmann
@ 2020-05-09 14:08     ` Fabrice Fontaine
  0 siblings, 0 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2020-05-09 14:08 UTC (permalink / raw)
  To: buildroot

Hello Stephan,

Le sam. 9 mai 2020 ? 14:58, Stephan Hoffmann <sho@relinux.de> a ?crit :
>
> 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.
>
> Kind regards
>
> Stephan
>
> Am 25.04.20 um 22:16 schrieb Thomas Petazzoni:
> > On Sat, 25 Apr 2020 12:48:16 +0200
> > Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> >
> >> Fixes:
> >>  - http://autobuild.buildroot.org/results/a30823f1388f37820d8a4f29b9b2c1de9b3992ac
> >>
> >> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> >> ---
> >>  ...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
Best Regards,

Fabrice

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

end of thread, other threads:[~2020-05-09 14:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25 10:48 [Buildroot] [PATCH 1/1] package/mtdev2tuio: fix build with musl 1.2.0 Fabrice Fontaine
2020-04-25 20:16 ` Thomas Petazzoni
2020-05-09 12:58   ` Stephan Hoffmann
2020-05-09 14:08     ` Fabrice Fontaine

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.