diff options
author | Daniel Mack <daniel@caiaq.de> | 2009-11-23 00:12:18 +0100 |
---|---|---|
committer | Daniel Mack <daniel@caiaq.de> | 2009-12-16 16:11:36 +0800 |
commit | 17d34462eace417075efa2314999a77e41a3849b (patch) | |
tree | 55bc1bbf154797026d7dcd42762b7b12eac16cf9 /src/pulsecore/lock-autospawn.c | |
parent | 962164a3b7f17f8a981862d7913a420636241a41 (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/pulsecore/lock-autospawn.c')
-rw-r--r-- | src/pulsecore/lock-autospawn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pulsecore/lock-autospawn.c b/src/pulsecore/lock-autospawn.c index 65e35634..95ca04a8 100644 --- a/src/pulsecore/lock-autospawn.c +++ b/src/pulsecore/lock-autospawn.c @@ -33,6 +33,7 @@ #include <pulse/i18n.h> #include <pulse/xmalloc.h> +#include <pulsecore/poll.h> #include <pulsecore/mutex.h> #include <pulsecore/thread.h> #include <pulsecore/core-util.h> @@ -182,7 +183,7 @@ static void wait_for_ping(void) { pfd.fd = pipe_fd[0]; pfd.events = POLLIN; - if ((k = poll(&pfd, 1, -1)) != 1) { + if ((k = pa_poll(&pfd, 1, -1)) != 1) { pa_assert(k < 0); pa_assert(errno == EINTR); } else if ((s = read(pipe_fd[0], &x, 1)) != 1) { |