Skip to content

Commit

Permalink
[ANDROID] Fixed wrapping of epoll_pwait2 to epoll_pwait timeout param…
Browse files Browse the repository at this point in the history
…eter
  • Loading branch information
ptitSeb committed Mar 4, 2025
1 parent 39583c6 commit ad70feb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wrapped/wrappedlibc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ad70feb

Please sign in to comment.