提交 a41aebf1 编写于 作者: M Max Shakhmetov 提交者: 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: NLuca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 9ac2085d)
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册