From c7804b5f493d46f92ce1547836bbefc9c3262a36 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 14 May 2009 21:23:59 +0000 Subject: [PATCH] fix compatibility with pre-XP windows versions git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8964 d7cf8633-e32d-0410-b094-e92efae38249 --- lhnet.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lhnet.c b/lhnet.c index fd668b7e..00a6c78b 100644 --- a/lhnet.c +++ b/lhnet.c @@ -1,6 +1,12 @@ // Written by Forest Hale 2003-06-15 and placed into public domain. +#ifdef WIN32 +// Windows XP or higher is required for getaddrinfo, but the inclusion of wspiapi provides fallbacks for older versions +#include +#include +#endif + #ifndef STANDALONETEST #include "quakedef.h" #endif @@ -9,12 +15,7 @@ #include #include #include -#ifdef WIN32 -#define _WIN32_WINNT 0x0501 - // Windows XP or higher is required for getaddrinfo -#include -#include -#else +#ifndef WIN32 #include #include #include -- 2.39.2