From 8ac17a2ae61adbeb1214f8f420615f82f929e7a1 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 20 Jul 2017 20:40:17 -0400 Subject: [PATCH] sndio: fixed poll() call (thanks, kdrakehp!). Fixes Bugzilla #3705. --- src/audio/sndio/SDL_sndioaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/sndio/SDL_sndioaudio.c b/src/audio/sndio/SDL_sndioaudio.c index a16c6fda1..e74cdce60 100644 --- a/src/audio/sndio/SDL_sndioaudio.c +++ b/src/audio/sndio/SDL_sndioaudio.c @@ -184,7 +184,7 @@ SNDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) r = SNDIO_sio_read(this->hidden->dev, buffer, buflen); while (r == 0 && !SNDIO_sio_eof(this->hidden->dev)) { if ((nfds = SNDIO_sio_pollfd(this->hidden->dev, this->hidden->pfd, POLLIN)) <= 0 - || poll(this->hidden->pfd, nfds, INFTIM) <= 0) { + || poll(this->hidden->pfd, nfds, INFTIM) < 0) { return -1; } revents = SNDIO_sio_revents(this->hidden->dev, this->hidden->pfd);