mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 14:01:26 +00:00
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
This commit is contained in:
parent
78ebe4ff0a
commit
586447e449
1 changed files with 6 additions and 0 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue