mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -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
|
|
@ -23,9 +23,9 @@
|
|||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/poll.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <pulsecore/poll.h>
|
||||
#include <pulsecore/macro.h>
|
||||
#include <pulsecore/thread.h>
|
||||
#include <pulsecore/lock-autospawn.h>
|
||||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue