void-packages/srcpkgs/libevdevPlus/patches/time64.patch

25 lines
661 B
Diff

--- a/InputEvent.hpp 2020-02-11 17:02:44.000000000 +0100
+++ b/InputEvent.hpp 2020-12-11 16:56:14.324990733 +0100
@@ -20,7 +20,7 @@
public:
input_event event{};
- timeval &Time = event.time;
+ timeval Time = {event.input_event_sec, event.input_event_usec};
uint16_t &Type = event.type;
uint16_t &Code = event.code;
int32_t &Value = event.value;
@@ -36,8 +36,10 @@
Code = code;
Value = value;
- if (time)
- memcpy(&event.time, time, sizeof(timeval));
+ if (time) {
+ event.input_event_sec = time->tv_sec;
+ event.input_event_usec = time->tv_usec;
+ }
}
friend void swap(InputEvent &first, InputEvent &second) {