mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix poll(2) timeout not being miliseconds.
This commit is contained in:
parent
2291076f19
commit
8d89a6f8ad
1 changed files with 3 additions and 3 deletions
|
@ -28,7 +28,7 @@
|
|||
extern "C" int poll(struct pollfd* fds, nfds_t nfds, int timeout)
|
||||
{
|
||||
struct timespec ts;
|
||||
ts.tv_sec = timeout;
|
||||
ts.tv_nsec = 0;
|
||||
return ppoll(fds, nfds, &ts, NULL);
|
||||
ts.tv_sec = timeout / 1000;
|
||||
ts.tv_nsec = timeout % 1000;
|
||||
return ppoll(fds, nfds, timeout < 0 ? NULL : &ts, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue