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

« back to all changes in this revision

Viewing changes to common/ppoll.h

  • Committer: Bazaar Package Importer
  • Author(s): Mario Limonciello
  • Date: 2008-10-07 12:10:29 UTC
  • Revision ID: james.westby@ubuntu.com-20081007121029-4gup4fmmh2vfo5nh
Tags: upstream-4.12
ImportĀ upstreamĀ versionĀ 4.12

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
}