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/tests/lock-autospawn-test.c | 4 ++-- src/tests/rtpoll-test.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tests') diff --git a/src/tests/lock-autospawn-test.c b/src/tests/lock-autospawn-test.c index c754e230..6f7156d7 100644 --- a/src/tests/lock-autospawn-test.c +++ b/src/tests/lock-autospawn-test.c @@ -23,9 +23,9 @@ #include #endif -#include #include +#include #include #include #include @@ -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)); } diff --git a/src/tests/rtpoll-test.c b/src/tests/rtpoll-test.c index 1706cdfa..6a6b73a8 100644 --- a/src/tests/rtpoll-test.c +++ b/src/tests/rtpoll-test.c @@ -22,8 +22,8 @@ #endif #include -#include +#include #include #include -- cgit