libc: fix timeout calculation in 'ppoll()'

Fixes #3791
This commit is contained in:
Christian Prochaska 2020-06-29 18:20:53 +02:00 committed by Christian Helmuth
parent 8e205e0324
commit 6e71208db3

View File

@ -125,7 +125,7 @@ int ppoll(struct pollfd fds[], nfds_t nfds,
const sigset_t*)
{
int timeout_ms = timeout ?
(timeout->tv_sec * 1000 + timeout->tv_nsec / 1000) :
(timeout->tv_sec * 1000 + timeout->tv_nsec / 1000000) :
-1;
return poll(fds, nfds, timeout_ms);
}