diff --git a/dlls/ws2_32/async.c b/dlls/ws2_32/async.c index fccca26dd5f..93615f8ba8b 100644 --- a/dlls/ws2_32/async.c +++ b/dlls/ws2_32/async.c @@ -53,16 +53,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(winsock); -/* critical section to protect some non-reentrant net function */ -CRITICAL_SECTION csWSgetXXXbyYYY; -static CRITICAL_SECTION_DEBUG critsect_debug = -{ - 0, 0, &csWSgetXXXbyYYY, - { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, - 0, 0, { (DWORD_PTR)(__FILE__ ": csWSgetXXXbyYYY") } -}; -CRITICAL_SECTION csWSgetXXXbyYYY = { &critsect_debug, -1, 0, 0, 0, 0 }; - #define AQ_WIN16 0x00 #define AQ_WIN32 0x04 #define HB_WIN32(hb) (hb->query.flags & AQ_WIN32) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 4462a9ab93c..6c78210c8b3 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -168,7 +168,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(winsock); /* critical section to protect some non-reentrant net function */ -extern CRITICAL_SECTION csWSgetXXXbyYYY; +static CRITICAL_SECTION csWSgetXXXbyYYY; +static CRITICAL_SECTION_DEBUG critsect_debug = +{ + 0, 0, &csWSgetXXXbyYYY, + { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": csWSgetXXXbyYYY") } +}; +static CRITICAL_SECTION csWSgetXXXbyYYY = { &critsect_debug, -1, 0, 0, 0, 0 }; union generic_unix_sockaddr {