Fix compatibility with musl's time64 on 32-bit arches. See https://gitlab.alpinelinux.org/alpine/aports/-/commit/1d4742aaaea19666bffb2a71a4312da0dcc41f72#note_180127 diff --git a/src/vkbd/uinput.c b/src/vkbd/uinput.c index 90eb4ad..abb0712 100644 --- a/src/vkbd/uinput.c +++ b/src/vkbd/uinput.c @@ -195,8 +195,8 @@ static void write_key_event(const struct vkbd *vkbd, uint8_t code, int state) ev.value = state; - ev.time.tv_sec = 0; - ev.time.tv_usec = 0; + ev.input_event_sec = 0; + ev.input_event_usec = 0; xwrite(fd, &ev, sizeof(ev)); @@ -230,8 +230,8 @@ void vkbd_mouse_move(const struct vkbd *vkbd, int x, int y) ev.code = REL_X; ev.value = x; - ev.time.tv_sec = 0; - ev.time.tv_usec = 0; + ev.input_event_sec = 0; + ev.input_event_usec = 0; xwrite(vkbd->pfd, &ev, sizeof(ev)); } @@ -241,8 +241,8 @@ void vkbd_mouse_move(const struct vkbd *vkbd, int x, int y) ev.code = REL_Y; ev.value = y; - ev.time.tv_sec = 0; - ev.time.tv_usec = 0; + ev.input_event_sec = 0; + ev.input_event_usec = 0; xwrite(vkbd->pfd, &ev, sizeof(ev)); } @@ -262,8 +262,8 @@ void vkbd_mouse_scroll(const struct vkbd *vkbd, int x, int y) ev.code = REL_WHEEL; ev.value = y; - ev.time.tv_sec = 0; - ev.time.tv_usec = 0; + ev.input_event_sec = 0; + ev.input_event_usec = 0; xwrite(vkbd->pfd, &ev, sizeof(ev)); @@ -271,8 +271,8 @@ void vkbd_mouse_scroll(const struct vkbd *vkbd, int x, int y) ev.code = REL_HWHEEL; ev.value = x; - ev.time.tv_sec = 0; - ev.time.tv_usec = 0; + ev.input_event_sec = 0; + ev.input_event_usec = 0; xwrite(vkbd->pfd, &ev, sizeof(ev)); @@ -292,8 +292,8 @@ void vkbd_mouse_move_abs(const struct vkbd *vkbd, int x, int y) ev.code = ABS_X; ev.value = x; - ev.time.tv_sec = 0; - ev.time.tv_usec = 0; + ev.input_event_sec = 0; + ev.input_event_usec = 0; xwrite(vkbd->pfd, &ev, sizeof(ev)); } @@ -303,8 +303,8 @@ void vkbd_mouse_move_abs(const struct vkbd *vkbd, int x, int y) ev.code = ABS_Y; ev.value = y; - ev.time.tv_sec = 0; - ev.time.tv_usec = 0; + ev.input_event_sec = 0; + ev.input_event_usec = 0; xwrite(vkbd->pfd, &ev, sizeof(ev)); }