summaryrefslogtreecommitdiffstats
path: root/src/pulse/mainloop.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-11-23 00:12:18 +0100
committerDaniel Mack <daniel@caiaq.de>2009-12-16 16:11:36 +0800
commit17d34462eace417075efa2314999a77e41a3849b (patch)
tree55bc1bbf154797026d7dcd42762b7b12eac16cf9 /src/pulse/mainloop.c
parent962164a3b7f17f8a981862d7913a420636241a41 (diff)
poll() is totally broken on Mac OS X
Even on 10.5.8, poll() does not do the right thing. Haven't checked on newer versions. Hence, wrap all occurences of poll() to pa_poll and emulate that call with select() on OSX. This is totally embarassing.
Diffstat (limited to 'src/pulse/mainloop.c')
-rw-r--r--src/pulse/mainloop.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index 6cd089ef..8f743ec7 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
@@ -32,12 +32,6 @@
#include <fcntl.h>
#include <errno.h>
-#ifdef HAVE_POLL_H
-#include <poll.h>
-#else
-#include <pulsecore/poll.h>
-#endif
-
#ifndef HAVE_PIPE
#include <pulsecore/pipe.h>
#endif
@@ -47,6 +41,7 @@
#include <pulse/timeval.h>
#include <pulse/xmalloc.h>
+#include <pulsecore/poll.h>
#include <pulsecore/core-rtclock.h>
#include <pulsecore/core-util.h>
#include <pulsecore/llist.h>
@@ -887,7 +882,7 @@ int pa_mainloop_poll(pa_mainloop *m) {
m->prepared_timeout == PA_USEC_INVALID ? NULL : pa_timespec_store(&ts, m->prepared_timeout),
NULL);
#else
- m->poll_func_ret = poll(
+ m->poll_func_ret = pa_poll(
m->pollfds, m->n_pollfds,
usec_to_timeout(m->prepared_timeout));
#endif