From 17d34462eace417075efa2314999a77e41a3849b Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Mon, 23 Nov 2009 00:12:18 +0100 Subject: 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. --- src/pulse/mainloop.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/pulse/mainloop.c') 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 #include -#ifdef HAVE_POLL_H -#include -#else -#include -#endif - #ifndef HAVE_PIPE #include #endif @@ -47,6 +41,7 @@ #include #include +#include #include #include #include @@ -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 -- cgit