diff options
Diffstat (limited to '')
-rw-r--r-- | lib/pselect.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/pselect.c b/lib/pselect.c index 52d3837..54732e5 100644 --- a/lib/pselect.c +++ b/lib/pselect.c @@ -1,6 +1,6 @@ /* pselect - synchronous I/O multiplexing - Copyright 2011-2023 Free Software Foundation, Inc. + Copyright 2011-2024 Free Software Foundation, Inc. This file is part of gnulib. @@ -59,8 +59,10 @@ pselect (int nfds, fd_set *restrict rfds, return -1; } - tv.tv_sec = timeout->tv_sec; - tv.tv_usec = (timeout->tv_nsec + 999) / 1000; + tv = (struct timeval) { + .tv_sec = timeout->tv_sec, + .tv_usec = (timeout->tv_nsec + 999) / 1000 + }; tvp = &tv; } else |