]> git.sesse.net Git - vlc/blobdiff - src/network/poll.c
network/udp.c net_SetCSCov(): removes warnings if UDPLITE_RECV_CSCOV and DCCP_SOCKOPT...
[vlc] / src / network / poll.c
index b8b19721a2f3737ba4e459cd48bc2da06fe26d64..666c812e480af0bd3c42721ac8b016ae2264d356 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 
 #ifndef HAVE_POLL
@@ -69,9 +73,9 @@ int poll (struct pollfd *fds, unsigned nfds, int timeout)
     for (unsigned i = 0; i < nfds; i++)
     {
         int fd = fds[i].fd;
-        fds[i].revents = (FD_ISSET (fds[i].fd, &rdset) ? POLLIN : 0)
-                       | (FD_ISSET (fds[i].fd, &wrset) ? POLLOUT : 0)
-                       | (FD_ISSET (fds[i].fd, &exset) ? POLLPRI : 0);
+        fds[i].revents = (FD_ISSET (fd, &rdset) ? POLLIN : 0)
+                       | (FD_ISSET (fd, &wrset) ? POLLOUT : 0)
+                       | (FD_ISSET (fd, &exset) ? POLLPRI : 0);
     }
     return val;
 }