mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
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.
This commit is contained in:
parent
962164a3b7
commit
17d34462ea
12 changed files with 34 additions and 40 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue