]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix compatibility with old windows versions when USE_WSPIAPI_H is
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 2 Nov 2009 00:43:04 +0000 (00:43 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 2 Nov 2009 00:43:04 +0000 (00:43 +0000)
defined

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9409 d7cf8633-e32d-0410-b094-e92efae38249

lhnet.c

diff --git a/lhnet.c b/lhnet.c
index 7da46a74ecf2a799aa3ad99078cf8a0710308f81..8b71ed91a53a90611f9393e637450c3aabb49dd0 100644 (file)
--- a/lhnet.c
+++ b/lhnet.c
@@ -3,10 +3,13 @@
 
 #ifdef WIN32
 // Windows XP or higher is required for getaddrinfo, but the inclusion of wspiapi provides fallbacks for older versions
-#define _WIN32_WINNT 0x0501
-#include <winsock2.h>
-#include <ws2tcpip.h>
-//#include <wspiapi.h>
+# define _WIN32_WINNT 0x0501
+# include <winsock2.h>
+# ifdef USE_WSPIAPI_H
+#  include <wspiapi.h>
+# else
+#  include <ws2tcpip.h>
+# endif
 #endif
 
 #ifndef STANDALONETEST