Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 29037:db90843b00fc legacy-trunk
Yet another addition to [731644]: only use the lock if thread-support
is enabled.
| author | Just van Rossum <just@letterror.com> |
|---|---|
| date | Fri, 09 May 2003 08:12:00 +0000 |
| parents | ccf7e138a126 |
| children | 90342f395721 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Fri May 09 08:03:44 2003 +0000 +++ b/Modules/socketmodule.c Fri May 09 08:12:00 2003 +0000 @@ -142,8 +142,8 @@ /* 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
