From cdee08e36582e443ff8a9bed17ec409551c9f93b Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Mon, 25 Jun 2012 12:08:44 +0300 Subject: network: Check for struct pollfd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to include winsock2.h here, to make sure we have the real pollfd struct definition, if one exists, before defining the fallback poll function. Signed-off-by: Martin Storsjö --- libavformat/os_support.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libavformat/os_support.h') diff --git a/libavformat/os_support.h b/libavformat/os_support.h index 3db20a9aa8..cda84b0296 100644 --- a/libavformat/os_support.h +++ b/libavformat/os_support.h @@ -75,6 +75,10 @@ typedef int socklen_t; #if !HAVE_POLL_H typedef unsigned long nfds_t; +#if HAVE_WINSOCK2_H +#include +#endif +#if !HAVE_STRUCT_POLLFD struct pollfd { int fd; short events; /* events to look for */ @@ -94,6 +98,7 @@ struct pollfd { #define POLLERR 0x0004 /* errors pending */ #define POLLHUP 0x0080 /* disconnected */ #define POLLNVAL 0x1000 /* invalid file descriptor */ +#endif int poll(struct pollfd *fds, nfds_t numfds, int timeout); -- cgit v1.2.3