• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifdef ppoll
2 #undef ppoll
3 #endif
4 
5 #define ppoll compat_ppoll
6 
compat_ppoll(struct pollfd * fds,nfds_t nfds,const struct timespec * timeout,const sigset_t * sigmask)7 static inline int compat_ppoll(struct pollfd *fds, nfds_t nfds,
8 		const struct timespec *timeout, const sigset_t *sigmask)
9 {
10 	if (timeout == NULL)
11 		return poll(fds, nfds, -1);
12 	else if (timeout->tv_sec == 0)
13 		return poll(fds, nfds, 500);
14 	else
15 		return poll(fds, nfds, timeout->tv_sec * 1000);
16 }
17