~ubuntu-branches/ubuntu/wily/bluez/wily

« back to all changes in this revision

Viewing changes to common/ppoll.h

ImportĀ upstreamĀ versionĀ 4.81

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifdef ppoll
2
 
#undef ppoll
3
 
#endif
4
 
 
5
 
#define ppoll compat_ppoll
6
 
 
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
 
}