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/utils/pacmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils/pacmd.c') diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c index ef58e9ce..6ffe94fe 100644 --- a/src/utils/pacmd.c +++ b/src/utils/pacmd.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #include @@ -38,6 +37,7 @@ #include #include +#include #include #include #include @@ -153,7 +153,7 @@ int main(int argc, char*argv[]) { else if (!ibuf_eof) pollfd[WATCH_STDIN].events |= POLLIN; - if (poll(pollfd, N_WATCH, -1) < 0) { + if (pa_poll(pollfd, N_WATCH, -1) < 0) { if (errno == EINTR) continue; -- cgit