From ad70febaac6e69fc0043ae3305831e38f53b2caa Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Tue, 4 Mar 2025 22:44:18 +0100 Subject: [ANDROID] Fixed wrapping of epoll_pwait2 to epoll_pwait timeout parameter --- src/wrapped/wrappedlibc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 9686de1b..38f86b59 100644 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -2204,10 +2204,10 @@ EXPORT int my_epoll_pwait2(int epfd, void* events, int maxevents, const struct t struct epoll_event _events[maxevents]; //AlignEpollEvent(_events, events, maxevents); #ifdef ANDROID - // epoll_pwait2 doesn't exist, to tranforming timeout to int... + // epoll_pwait2 doesn't exist, to tranforming timeout to int, and from nanosecods to milliseconds... int tout = -1; if(timeout) { - int64_t tmp = timeout->tv_nsec + timeout->tv_sec*1000000000LL; + int64_t tmp = (timeout->tv_nsec + timeout->tv_sec*1000000000LL)/1000000LL; if(tmp>1<<31) tmp = 1<<31; tout = tmp; } -- cgit 1.4.1