Mercurial > libavformat.hg
diff os_support.c @ 2322:fb72d949bae3 libavformat
Check for winsock2.h instead of __MINGW32__
author | ramiro |
---|---|
date | Wed, 08 Aug 2007 19:18:10 +0000 |
parents | ab05e25d2df2 |
children | 13b65f62e3a6 |
line wrap: on
line diff
--- a/os_support.c Wed Aug 08 12:08:16 2007 +0000 +++ b/os_support.c Wed Aug 08 19:18:10 2007 +0000 @@ -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 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 n; int rc; -#ifdef __MINGW32__ +#ifdef HAVE_WINSOCK2_H if (numfds >= FD_SETSIZE) { errno = EINVAL; return -1; @@ -107,7 +107,7 @@ 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;