antimicrox: fix build w/ musl-1.2.1 (time64)

This commit is contained in:
Jürgen Buchmüller 2020-12-06 10:22:08 +01:00
parent e8f2bc9472
commit f726568a7a

View file

@ -0,0 +1,27 @@
--- src/eventhandlers/uinputeventhandler.cpp 2020-10-02 09:51:36.000000000 +0200
+++ src/eventhandlers/uinputeventhandler.cpp 2020-12-06 10:17:47.922175141 +0100
@@ -498,9 +498,12 @@
{
struct input_event ev;
struct input_event ev2;
+ struct timeval tv;
memset(&ev, 0, sizeof(struct input_event));
- gettimeofday(&ev.time, nullptr);
+ gettimeofday(&tv, nullptr);
+ ev.input_event_sec = tv.tv_sec;
+ ev.input_event_usec = tv.tv_usec;
ev.type = type;
ev.code = code;
ev.value = value;
@@ -510,7 +513,9 @@
if (syn)
{
memset(&ev2, 0, sizeof(struct input_event));
- gettimeofday(&ev2.time, nullptr);
+ gettimeofday(&tv, nullptr);
+ ev2.input_event_sec = tv.tv_sec;
+ ev2.input_event_usec = tv.tv_usec;
ev2.type = EV_SYN;
ev2.code = SYN_REPORT;
ev2.value = 0;