Message ID | 20200330212434.10155-1-rosenp@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | keytable: use input_event properly | expand |
On Mon, Mar 30, 2020 at 02:24:34PM -0700, Rosen Penev wrote: > It does not use time_t under musl when time_t is 64-bit. The struct has > compatibility defines. Instead of using time_t directly, use those > defines. > > Fixes compilation under musl 1.2.0 under 32-bit OSes. Looks good, merged. Thanks, Sean > > Signed-off-by: Rosen Penev <rosenp@gmail.com> > --- > utils/keytable/keytable.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c > index aad993ea..bc890394 100644 > --- a/utils/keytable/keytable.c > +++ b/utils/keytable/keytable.c > @@ -1551,7 +1551,7 @@ static void test_event(struct rc_device *rc_dev, int fd) > > for (i = 0; i < rd / sizeof(struct input_event); i++) { > printf(_("%ld.%06ld: event type %s(0x%02x)"), > - ev[i].time.tv_sec, ev[i].time.tv_usec, > + ev[i].input_event_sec, ev[i].input_event_usec, > get_event_name(events_type, ev[i].type), ev[i].type); > > switch (ev[i].type) { > -- > 2.25.1
diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c index aad993ea..bc890394 100644 --- a/utils/keytable/keytable.c +++ b/utils/keytable/keytable.c @@ -1551,7 +1551,7 @@ static void test_event(struct rc_device *rc_dev, int fd) for (i = 0; i < rd / sizeof(struct input_event); i++) { printf(_("%ld.%06ld: event type %s(0x%02x)"), - ev[i].time.tv_sec, ev[i].time.tv_usec, + ev[i].input_event_sec, ev[i].input_event_usec, get_event_name(events_type, ev[i].type), ev[i].type); switch (ev[i].type) {
It does not use time_t under musl when time_t is 64-bit. The struct has compatibility defines. Instead of using time_t directly, use those defines. Fixes compilation under musl 1.2.0 under 32-bit OSes. Signed-off-by: Rosen Penev <rosenp@gmail.com> --- utils/keytable/keytable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)