summaryrefslogtreecommitdiff
path: root/src/tests/lock-autospawn-test.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/tests/lock-autospawn-test.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/tests/lock-autospawn-test.c')
-rw-r--r--src/tests/lock-autospawn-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/lock-autospawn-test.c b/src/tests/lock-autospawn-test.c
index c754e2308..6f7156d7e 100644
--- a/src/tests/lock-autospawn-test.c
+++ b/src/tests/lock-autospawn-test.c
@@ -23,9 +23,9 @@
#include <config.h>
#endif
-#include <sys/poll.h>
#include <string.h>
+#include <pulsecore/poll.h>
#include <pulsecore/macro.h>
#include <pulsecore/thread.h>
#include <pulsecore/lock-autospawn.h>
@@ -69,7 +69,7 @@ static void thread_func2(void *k) {
pollfd.fd = fd;
pollfd.events = POLLIN;
- pa_assert_se(poll(&pollfd, 1, -1) == 1);
+ pa_assert_se(pa_poll(&pollfd, 1, -1) == 1);
pa_log("%i, woke up", PA_PTR_TO_INT(k));
}