Description: compatibility with 64-bit time_t linux/input.h uses a different structure when time_t is 64-bit, so patch around this. Author: Steve Langasek Bug-Debian: https://bugs.debian.org/1067616 Last-Update: 2024-04-25 Forwarded: no Index: clanlib-1.0~svn3827/Sources/GL/GLX/input_device_linuxevent.cpp =================================================================== --- clanlib-1.0~svn3827.orig/Sources/GL/GLX/input_device_linuxevent.cpp +++ clanlib-1.0~svn3827/Sources/GL/GLX/input_device_linuxevent.cpp @@ -42,6 +42,16 @@ #include "API/Display/input_event.h" #include "input_device_linuxevent.h" +/* The field to look up in struct input_event for integer seconds */ +#ifndef input_event_sec +#define input_event_sec time.tv_sec +#endif + +/* The field to look up in struct input_event for fractional seconds */ +#ifndef input_event_usec +#define input_event_usec time.tv_usec +#endif + // FIXME: These three should be in linux/input.h #define MSC_RAW 0x03 #define MSC_SCAN 0x04 @@ -266,12 +276,12 @@ if (ev[i].type == EV_SYN) { printf("Event: time %ld.%06ld, -------------- %s ------------\n", - ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].code ? "Config Sync" : "Report Sync" ); + ev[i].input_event_sec, ev[i].input_event_usec, ev[i].code ? "Config Sync" : "Report Sync" ); } else if (ev[i].type == EV_MSC && (ev[i].code == MSC_RAW || ev[i].code == MSC_SCAN)) { printf("Event: time %ld.%06ld, type %d (%s), code %d (%s), value %02x\n", - ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type, + ev[i].input_event_sec, ev[i].input_event_usec, ev[i].type, events[ev[i].type] ? events[ev[i].type] : "?", ev[i].code, names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?", @@ -280,7 +290,7 @@ else { printf("Event: time %ld.%06ld, type %d (%s), code %d (%s), value %d\n", - ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type, + ev[i].input_event_sec, ev[i].input_event_usec, ev[i].type, events[ev[i].type] ? events[ev[i].type] : "?", ev[i].code, names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?",