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/utils | |
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/utils')
-rw-r--r-- | src/utils/pacmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 <assert.h> #include <signal.h> -#include <sys/poll.h> #include <sys/socket.h> #include <unistd.h> #include <errno.h> @@ -38,6 +37,7 @@ #include <pulse/xmalloc.h> #include <pulse/i18n.h> +#include <pulsecore/poll.h> #include <pulsecore/macro.h> #include <pulsecore/core-util.h> #include <pulsecore/log.h> @@ -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; |