]> git.sesse.net Git - ffmpeg/commitdiff
os_support: make poll() fallbacks conditional on CONFIG_NETWORK
authorMans Rullgard <mans@mansr.com>
Fri, 28 Jan 2011 17:16:15 +0000 (17:16 +0000)
committerMans Rullgard <mans@mansr.com>
Fri, 28 Jan 2011 17:23:19 +0000 (17:23 +0000)
poll() is only used by networking code, so the fallback should
only be built if networking is enabled.  Also remove CONFIG_FFSERVER
condition from the declarations.

This should fix building on systems without poll(), broken
by a8475bbdb64e638bd8161df9647876fd23f8a29a.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavformat/os_support.c
libavformat/os_support.h

index 70cca92c8d146803625ca2110ad53e0466c9b955..4f73011d65f162e035a555e9285079c62e3847a3 100644 (file)
@@ -234,7 +234,6 @@ int ff_socket_nonblock(int socket, int enable)
       return fcntl(socket, F_SETFL, fcntl(socket, F_GETFL) & ~O_NONBLOCK);
 #endif
 }
-#endif /* CONFIG_NETWORK */
 
 #if !HAVE_POLL_H
 int poll(struct pollfd *fds, nfds_t numfds, int timeout)
@@ -304,3 +303,4 @@ int poll(struct pollfd *fds, nfds_t numfds, int timeout)
     return rc;
 }
 #endif /* HAVE_POLL_H */
+#endif /* CONFIG_NETWORK */
index 5c9e81b340ca6bde2b6eccbeea9b0b29aa8eabbb..df321511ed554462b283cd53bf1401d69b2ccec8 100644 (file)
@@ -55,7 +55,6 @@ typedef int socklen_t;
 #define closesocket close
 #endif
 
-#if CONFIG_FFSERVER
 #if !HAVE_POLL_H
 typedef unsigned long nfds_t;
 
@@ -82,7 +81,6 @@ struct pollfd {
 
 int poll(struct pollfd *fds, nfds_t numfds, int timeout);
 #endif /* HAVE_POLL_H */
-#endif /* CONFIG_FFSERVER */
 #endif /* CONFIG_NETWORK */
 
 #endif /* AVFORMAT_OS_SUPPORT_H */