All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/tslib: fix build with headers >= 4.16
@ 2020-03-11 20:17 Fabrice Fontaine
  2020-03-22 14:56 ` Thomas Petazzoni
  2020-04-07 15:59 ` Peter Korsgaard
  0 siblings, 2 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2020-03-11 20:17 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...ld-on-32bit-arches-with-64bit-time_t.patch | 386 ++++++++++++++++++
 1 file changed, 386 insertions(+)
 create mode 100644 package/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch

diff --git a/package/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/package/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 0000000000..d894a35d21
--- /dev/null
+++ b/package/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
@@ -0,0 +1,386 @@
+From 09eeff8c90a82e7aa9ff215320d558c1147982f6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/libts/tslib/pull/162]
+---
+ 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.25.1

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

* [Buildroot] [PATCH 1/1] package/tslib: fix build with headers >= 4.16
  2020-03-11 20:17 [Buildroot] [PATCH 1/1] package/tslib: fix build with headers >= 4.16 Fabrice Fontaine
@ 2020-03-22 14:56 ` Thomas Petazzoni
  2020-04-07 15:59 ` Peter Korsgaard
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2020-03-22 14:56 UTC (permalink / raw)
  To: buildroot

On Wed, 11 Mar 2020 21:17:49 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fixes:
>  - http://autobuild.buildroot.org/results/bc8bc3f1d88f3b64765025fee7f941d30a81ee46
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...ld-on-32bit-arches-with-64bit-time_t.patch | 386 ++++++++++++++++++
>  1 file changed, 386 insertions(+)
>  create mode 100644 package/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1/1] package/tslib: fix build with headers >= 4.16
  2020-03-11 20:17 [Buildroot] [PATCH 1/1] package/tslib: fix build with headers >= 4.16 Fabrice Fontaine
  2020-03-22 14:56 ` Thomas Petazzoni
@ 2020-04-07 15:59 ` Peter Korsgaard
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2020-04-07 15:59 UTC (permalink / raw)
  To: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fixes:
 >  - http://autobuild.buildroot.org/results/bc8bc3f1d88f3b64765025fee7f941d30a81ee46

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

I was about to backport this to all the stable branches but I started
wondering why it hasn't triggered before giving that 4.16 is so old.

Digging further, I see this new kernel definition is only used if
__USE_TIME_BITS64 is defined by the C library, which is only the case
for the recently introduced musl 1.2.0.

But OK, the change is fairly small and people could end up using an
external musl 1.2.x based toolchain with the LTS branch, so I've applied
to 2020.02.x. (including the followup fix).

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 1/1] package/tslib: fix build with headers < 4.16
  2020-03-23  7:48 [Buildroot] [PATCH 1/1] package/tslib: fix build with headers < 4.16 Fabrice Fontaine
@ 2020-03-24 21:05 ` Thomas Petazzoni
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2020-03-24 21:05 UTC (permalink / raw)
  To: buildroot

On Mon, 23 Mar 2020 08:48:28 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Commit fedaa28079489b308f77d80a0cac8698d776df23 fixed build with
> headers >= 4.16 but as a side effect, build with headers < 4.16 is now
> failing so add an upstream patch
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/594cd1a0d9e6286eca62b575fd1ba2d3a5e01234
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...-with-input_event_sec-for-old-kernel.patch | 28 +++++++++++++++++++
>  1 file changed, 28 insertions(+)
>  create mode 100644 package/tslib/0002-Fix-build-error-with-input_event_sec-for-old-kernel.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1/1] package/tslib: fix build with headers < 4.16
@ 2020-03-23  7:48 Fabrice Fontaine
  2020-03-24 21:05 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2020-03-23  7:48 UTC (permalink / raw)
  To: buildroot

Commit fedaa28079489b308f77d80a0cac8698d776df23 fixed build with
headers >= 4.16 but as a side effect, build with headers < 4.16 is now
failing so add an upstream patch

Fixes:
 - http://autobuild.buildroot.org/results/594cd1a0d9e6286eca62b575fd1ba2d3a5e01234

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-with-input_event_sec-for-old-kernel.patch | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/tslib/0002-Fix-build-error-with-input_event_sec-for-old-kernel.patch

diff --git a/package/tslib/0002-Fix-build-error-with-input_event_sec-for-old-kernel.patch b/package/tslib/0002-Fix-build-error-with-input_event_sec-for-old-kernel.patch
new file mode 100644
index 0000000000..5dca3a009c
--- /dev/null
+++ b/package/tslib/0002-Fix-build-error-with-input_event_sec-for-old-kernel.patch
@@ -0,0 +1,28 @@
+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
+
+[Retrieved from:
+https://github.com/libts/tslib/commit/050bf24c16e95f63a76e13156346a072035d45b4]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@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.25.1

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

end of thread, other threads:[~2020-04-07 15:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 20:17 [Buildroot] [PATCH 1/1] package/tslib: fix build with headers >= 4.16 Fabrice Fontaine
2020-03-22 14:56 ` Thomas Petazzoni
2020-04-07 15:59 ` Peter Korsgaard
2020-03-23  7:48 [Buildroot] [PATCH 1/1] package/tslib: fix build with headers < 4.16 Fabrice Fontaine
2020-03-24 21:05 ` Thomas Petazzoni

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.