mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -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
|
|
@ -33,6 +33,7 @@
|
|||
#include <pulse/i18n.h>
|
||||
#include <pulse/xmalloc.h>
|
||||
|
||||
#include <pulsecore/poll.h>
|
||||
#include <pulsecore/mutex.h>
|
||||
#include <pulsecore/thread.h>
|
||||
#include <pulsecore/core-util.h>
|
||||
|
|
@ -182,7 +183,7 @@ static void wait_for_ping(void) {
|
|||
pfd.fd = pipe_fd[0];
|
||||
pfd.events = POLLIN;
|
||||
|
||||
if ((k = poll(&pfd, 1, -1)) != 1) {
|
||||
if ((k = pa_poll(&pfd, 1, -1)) != 1) {
|
||||
pa_assert(k < 0);
|
||||
pa_assert(errno == EINTR);
|
||||
} else if ((s = read(pipe_fd[0], &x, 1)) != 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue