summaryrefslogtreecommitdiffstats
path: root/osdep/poll_wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/poll_wrapper.c')
-rw-r--r--osdep/poll_wrapper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/osdep/poll_wrapper.c b/osdep/poll_wrapper.c
index 48a66d2cd1..4494392912 100644
--- a/osdep/poll_wrapper.c
+++ b/osdep/poll_wrapper.c
@@ -28,7 +28,9 @@
int mp_poll(struct pollfd *fds, int nfds, int64_t timeout_ns)
{
#if HAVE_PPOLL
- struct timespec ts = mp_time_ns_to_realtime(timeout_ns);
+ struct timespec ts;
+ ts.tv_sec = timeout_ns / UINT64_C(1000000000);
+ ts.tv_nsec = timeout_ns % UINT64_C(1000000000);
return ppoll(fds, nfds, &ts, NULL);
#endif
return poll(fds, nfds, timeout_ns / 1e6);