Skip to content

Commit

Permalink
tests: Make input_event handling compatible with 64-bit time_t
Browse files Browse the repository at this point in the history
The structure of struct input_event varies depending on whether 64-bit
`time_t` is in use.
  • Loading branch information
vorlonofportland authored and martinpitt committed Mar 24, 2024
1 parent 5e5ee15 commit 8ed5dbb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test-umockdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,12 @@ t_testbed_script_replay_evdev_event_framing(UMockdevTestbedFixture * fixture, UN
int fd;
char buf[1024];

#if __BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)
struct timeval dummy = {0};
#else
__kernel_ulong_t dummy = 0;
#endif

/* Simple evdev stream - x coordinate followed by SYN, times 2 */
struct input_event dummy_events[] = {
{dummy, 0003, 0000, 2534},
Expand Down

0 comments on commit 8ed5dbb

Please sign in to comment.