From 586447e449398f7abbba9afe8352cda5286b8ed0 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sat, 29 Jul 2017 00:35:03 +0000 Subject: [PATCH] net_wins.c: disable WSA*BlockingHook() stuff for winsock2 builds git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1454 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/net_wins.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Quake/net_wins.c b/Quake/net_wins.c index bb5ee9e5..f45a522c 100644 --- a/Quake/net_wins.c +++ b/Quake/net_wins.c @@ -40,6 +40,7 @@ WSADATA winsockdata; //============================================================================= +#if !defined(_USE_WINSOCK2) static double blocktime; static INT_PTR PASCAL FAR BlockingHook (void) @@ -66,6 +67,7 @@ static INT_PTR PASCAL FAR BlockingHook (void) /* TRUE if we got a message */ return ret; } +#endif /* ! _USE_WINSOCK2 */ static void WINS_GetLocalAddress (void) @@ -87,11 +89,15 @@ static void WINS_GetLocalAddress (void) } buff[MAXHOSTNAMELEN - 1] = 0; +#ifndef _USE_WINSOCK2 blocktime = Sys_DoubleTime(); WSASetBlockingHook(BlockingHook); +#endif local = gethostbyname(buff); err = WSAGetLastError(); +#ifndef _USE_WINSOCK2 WSAUnhookBlockingHook(); +#endif if (local == NULL) { Con_SafePrintf("WINS_GetLocalAddress: gethostbyname failed (%s)\n",