Commit a41aebf1 authored by Max Shakhmetov's avatar Max Shakhmetov Committed by Michael Niedermayer

os_support: fix poll() implementation

Our poll implementation does not iterate over the pollfd array properly
while setting the revents.
Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 9ac2085d)
parent 7ffe76e5
......@@ -292,7 +292,7 @@ int poll(struct pollfd *fds, nfds_t numfds, int timeout)
if (rc < 0)
return rc;
for(i = 0; i < (nfds_t) n; i++) {
for(i = 0; i < numfds; i++) {
fds[i].revents = 0;
if (FD_ISSET(fds[i].fd, &read_set)) fds[i].revents |= POLLIN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment