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/pulsecore/lock-autospawn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pulsecore/lock-autospawn.c') 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 #include +#include #include #include #include @@ -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) { -- cgit