summaryrefslogtreecommitdiff
path: root/libavformat/os_support.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2007-08-08 19:18:10 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2007-08-08 19:18:10 +0000
commit6ff3f3e7cec7cd78a01d0bf76cbccfbe68dc0894 (patch)
tree1583c4839515588850c3bb9041ab9909e3cc02f5 /libavformat/os_support.c
parent0bd5396778a28c989ae4fb08190bf4daf4f4ea0e (diff)
Check for winsock2.h instead of __MINGW32__
Originally committed as revision 9988 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/os_support.c')
-rw-r--r--libavformat/os_support.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index 65eb425eb3..13f82f76bb 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -25,7 +25,7 @@
#include <fcntl.h>
#ifndef HAVE_SYS_POLL_H
-#if defined(__MINGW32__)
+#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#else
#include <sys/select.h>
@@ -70,7 +70,7 @@ int resolve_host(struct in_addr *sin_addr, const char *hostname)
int ff_socket_nonblock(int socket, int enable)
{
-#ifdef __MINGW32__
+#ifdef HAVE_WINSOCK2_H
return ioctlsocket(socket, FIONBIO, &enable);
#else
if (enable)
@@ -92,7 +92,7 @@ int poll(struct pollfd *fds, nfds_t numfds, int timeout)
int n;
int rc;
-#ifdef __MINGW32__
+#ifdef HAVE_WINSOCK2_H
if (numfds >= FD_SETSIZE) {
errno = EINVAL;
return -1;
@@ -107,7 +107,7 @@ int poll(struct pollfd *fds, nfds_t numfds, int timeout)
for(i = 0; i < numfds; i++) {
if (fds[i].fd < 0)
continue;
-#ifndef __MINGW32__
+#ifndef HAVE_WINSOCK2_H
if (fds[i].fd >= FD_SETSIZE) {
errno = EINVAL;
return -1;