diff options
author | Martin Storsjö <martin@martin.st> | 2012-06-25 12:08:44 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-06-30 15:18:06 +0300 |
commit | cdee08e36582e443ff8a9bed17ec409551c9f93b (patch) | |
tree | b171fd28fd242e66d5d529c6e03e60355e59f732 /libavformat | |
parent | 71078ad3338d850a24071e93b69d2109a943f73e (diff) | |
download | ffmpeg-cdee08e36582e443ff8a9bed17ec409551c9f93b.tar.gz |
network: Check for struct pollfd
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ö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/os_support.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 <winsock2.h> +#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); |