diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-03-04 22:44:18 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-03-04 22:44:18 +0100 |
| commit | ad70febaac6e69fc0043ae3305831e38f53b2caa (patch) | |
| tree | 1518e28c5159a523f15345eb7f91897a13419e1f /src | |
| parent | 39583c6da4f43e63820d37c4a82ac02d95098e94 (diff) | |
| download | box64-ad70febaac6e69fc0043ae3305831e38f53b2caa.tar.gz box64-ad70febaac6e69fc0043ae3305831e38f53b2caa.zip | |
[ANDROID] Fixed wrapping of epoll_pwait2 to epoll_pwait timeout parameter
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped/wrappedlibc.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |