# HG changeset patch # User ramiro # Date 1186600690 0 # Node ID fb72d949bae39b63c9bd6de481b7c66c1a8d93f9 # Parent 96bab31539394c2c1f32c749a090a5ebd3f78f4e Check for winsock2.h instead of __MINGW32__ diff -r 96bab3153939 -r fb72d949bae3 network.h --- a/network.h Wed Aug 08 12:08:16 2007 +0000 +++ b/network.h Wed Aug 08 19:18:10 2007 +0000 @@ -21,7 +21,7 @@ #ifndef NETWORK_H #define NETWORK_H -#ifdef __MINGW32__ +#ifdef HAVE_WINSOCK2_H #include #include diff -r 96bab3153939 -r fb72d949bae3 os_support.c --- 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 #ifndef HAVE_SYS_POLL_H -#if defined(__MINGW32__) +#ifdef HAVE_WINSOCK2_H #include #else #include @@ -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; diff -r 96bab3153939 -r fb72d949bae3 os_support.h --- a/os_support.h Wed Aug 08 12:08:16 2007 +0000 +++ b/os_support.h Wed Aug 08 19:18:10 2007 +0000 @@ -43,6 +43,9 @@ # define usleep(t) Sleep((t) / 1000) # include # define lseek(f,p,w) _lseeki64((f), (p), (w)) +#endif + +#ifdef HAVE_WINSOCK2_H # define HAVE_CLOSESOCKET 1 #endif