diff options
| author | Ron Yorston <rmy@pobox.com> | 2024-10-25 08:27:34 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2024-10-25 08:27:34 +0100 |
| commit | a9cf4418d930ba38e3a9e000342fb7fcbd26e8ca (patch) | |
| tree | 75ed680e46f1e2a33afadee9691a0b65b3ceff0e | |
| parent | 93678239bba121c8cb88c32aa5ea410b52c3f293 (diff) | |
| download | busybox-w32-a9cf4418d930ba38e3a9e000342fb7fcbd26e8ca.tar.gz busybox-w32-a9cf4418d930ba38e3a9e000342fb7fcbd26e8ca.tar.bz2 busybox-w32-a9cf4418d930ba38e3a9e000342fb7fcbd26e8ca.zip | |
win32: update poll(2) to match latest gnulib version
| -rw-r--r-- | win32/poll.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/win32/poll.c b/win32/poll.c index fb95adea7..8ab6bbf29 100644 --- a/win32/poll.c +++ b/win32/poll.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Emulation for poll(2) | 1 | /* Emulation for poll(2) |
| 2 | Contributed by Paolo Bonzini. | 2 | Contributed by Paolo Bonzini. |
| 3 | 3 | ||
| 4 | Copyright 2001-2003, 2006-2022 Free Software Foundation, Inc. | 4 | Copyright 2001-2003, 2006-2024 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of gnulib. | 6 | This file is part of gnulib. |
| 7 | 7 | ||
| @@ -407,14 +407,15 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout) | |||
| 407 | if (timeout == 0) | 407 | if (timeout == 0) |
| 408 | { | 408 | { |
| 409 | ptv = &tv; | 409 | ptv = &tv; |
| 410 | ptv->tv_sec = 0; | 410 | tv = (struct timeval) {0}; |
| 411 | ptv->tv_usec = 0; | ||
| 412 | } | 411 | } |
| 413 | else if (timeout > 0) | 412 | else if (timeout > 0) |
| 414 | { | 413 | { |
| 415 | ptv = &tv; | 414 | ptv = &tv; |
| 416 | ptv->tv_sec = timeout / 1000; | 415 | tv = (struct timeval) { |
| 417 | ptv->tv_usec = (timeout % 1000) * 1000; | 416 | .tv_sec = timeout / 1000, |
| 417 | .tv_usec = (timeout % 1000) * 1000 | ||
| 418 | }; | ||
| 418 | } | 419 | } |
| 419 | else if (timeout == INFTIM) | 420 | else if (timeout == INFTIM) |
| 420 | /* wait forever */ | 421 | /* wait forever */ |
