mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-29 23:24:20 +08:00
Fix handling of compat_ppoll when no timeout is specified
This commit is contained in:
parent
5a14261153
commit
b866782105
@ -7,5 +7,10 @@
|
||||
static inline int compat_ppoll(struct pollfd *fds, nfds_t nfds,
|
||||
const struct timespec *timeout, const sigset_t *sigmask)
|
||||
{
|
||||
return poll(fds, nfds, timeout ? timeout->tv_sec * 1000 : 500);
|
||||
if (timeout == NULL)
|
||||
return poll(fds, nfds, -1);
|
||||
else if (timeout->tv_sec == 0)
|
||||
return poll(fds, nfds, 500);
|
||||
else
|
||||
return poll(fds, nfds, timeout->tv_sec * 1000);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user