From: Just van Rossum Date: Fri, 9 May 2003 08:12:00 +0000 (+0000) Subject: Yet another addition to [731644]: only use the lock if thread-support X-Git-Tag: v2.3c1~795 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16e426bb15a7166c7463693036b82942d78043e1;p=python Yet another addition to [731644]: only use the lock if thread-support is enabled. --- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 4447f096b3..fc5ea8f6df 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -142,8 +142,8 @@ shutdown(how) -- shut down traffic in one or both directions\n\ /* On systems on which getaddrinfo() is believed to not be thread-safe, (this includes the getaddrinfo emulation) protect access with a lock. */ -#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ - defined(__NetBSD__) || !defined(HAVE_GETADDRINFO) +#if defined(WITH_THREAD) && (defined(__APPLE__) || defined(__FreeBSD__) || \ + defined(__OpenBSD__) || defined(__NetBSD__) || !defined(HAVE_GETADDRINFO)) #define USE_GETADDRINFO_LOCK #endif