void-packages/srcpkgs/input-utils/patches/time64.patch

53 lines
1.7 KiB
Diff

--- a/input-recv.c 2017-02-22 10:45:30.000000000 +0100
+++ b/input-recv.c 2020-12-14 15:37:54.879345114 +0100
@@ -69,11 +69,11 @@
}
/* convert from network byte order ... */
- ev.time.tv_sec = ntohl(ev.time.tv_sec);
- ev.time.tv_usec = ntohl(ev.time.tv_usec);
- ev.type = ntohs(ev.type);
- ev.code = ntohs(ev.code);
- ev.value = ntohl(ev.value);
+ ev.input_event_sec = ntohl(ev.input_event_sec);
+ ev.input_event_usec = ntohl(ev.input_event_usec);
+ ev.type = ntohs(ev.type);
+ ev.code = ntohs(ev.code);
+ ev.value = ntohl(ev.value);
print_event(&ev);
}
--- a/input-send.c 2017-02-22 10:45:30.000000000 +0100
+++ b/input-send.c 2020-12-14 15:37:43.180824790 +0100
@@ -73,11 +73,11 @@
print_event(ev);
/* convert to network byte order ... */
- ev->time.tv_sec = htonl(ev->time.tv_sec);
- ev->time.tv_usec = htonl(ev->time.tv_usec);
- ev->type = htons(ev->type);
- ev->code = htons(ev->code);
- ev->value = htonl(ev->value);
+ ev->input_event_sec = htonl(ev->input_event_sec);
+ ev->input_event_usec = htonl(ev->input_event_usec);
+ ev->type = htons(ev->type);
+ ev->code = htons(ev->code);
+ ev->value = htonl(ev->value);
/* send out */
list_for_each_safe(item,safe,&connections) {
--- a/input.c 2017-02-22 10:45:30.000000000 +0100
+++ b/input.c 2020-12-14 15:40:13.783523241 +0100
@@ -208,9 +208,9 @@
char ts[32];
time_t t;
- t = event->time.tv_sec;
+ t = event->input_event_sec;
strftime(ts,sizeof(ts),"%H:%M:%S",localtime(&t));
- fprintf(stderr,"%s.%06ld: %s",ts,event->time.tv_usec,
+ fprintf(stderr,"%s.%06ld: %s",ts,event->input_event_usec,
EV_NAME[event->type]);
switch (event->type) {
case EV_KEY: