[FFmpeg-cvslog] os_support: make poll() fallbacks conditional on CONFIG_NETWORK

Mans Rullgard git
Sun Jan 30 04:15:55 CET 2011


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Fri Jan 28 17:16:15 2011 +0000| [13904b552b48e72bc472f98144ab54d0535ce99e] | committer: Michael Niedermayer

os_support: make poll() fallbacks conditional on CONFIG_NETWORK

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 at mansr.com>
(cherry picked from commit 362d8f7d9e6a3bca2ce89f767d153d3ab8bf5773)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=13904b552b48e72bc472f98144ab54d0535ce99e
---

 libavformat/os_support.c |    2 +-
 libavformat/os_support.h |    2 --
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index 70cca92..4f73011 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -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 */
diff --git a/libavformat/os_support.h b/libavformat/os_support.h
index 5c9e81b..df32151 100644
--- a/libavformat/os_support.h
+++ b/libavformat/os_support.h
@@ -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 */




More information about the ffmpeg-cvslog mailing list