From: Bob Beck Date: Thu, 18 Jun 2026 18:02:06 +0000 (-0600) Subject: Fix OSSL_ATOMICS_LOCKLESS detection for Windows toolchains X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b593fb151eb7373cb85f352e86bcb7225f9850d9;p=thirdparty%2Fopenssl.git Fix OSSL_ATOMICS_LOCKLESS detection for Windows toolchains The check referenced USE_INTERLOCKEDOR64, but the macro defined above for MSVC (with the right architecture/version) and 64-bit MinGW is OSSL_USE_INTERLOCKEDOR64. As a result, OSSL_ATOMICS_LOCKLESS was never defined on Windows, even though those toolchains do provide lockless atomics. Reported-by: Mounir IDRASSI Fixes: 26c57423933c "Use the actually correct define for solaris and gcc" Reviewed-by: Neil Horman Reviewed-by: Milan Broz Reviewed-by: Tim Hudson Reviewed-by: Eugene Syromiatnikov MergeDate: Mon Jun 22 07:22:31 2026 (Merged from https://github.com/openssl/openssl/pull/31600) --- diff --git a/include/internal/threads_common.h b/include/internal/threads_common.h index b6dea47ab98..e32257d6301 100644 --- a/include/internal/threads_common.h +++ b/include/internal/threads_common.h @@ -88,7 +88,7 @@ void CRYPTO_THREAD_clean_local(void); #endif /* Allow us to know if atomics will be implemented with a fallback lock or not. */ -#if defined(OSSL_USE_GCC_ATOMICS) || defined(OSSL_USE_SOLARIS_ATOMICS) || defined(USE_INTERLOCKEDOR64) +#if defined(OSSL_USE_GCC_ATOMICS) || defined(OSSL_USE_SOLARIS_ATOMICS) || defined(OSSL_USE_INTERLOCKEDOR64) #define OSSL_ATOMICS_LOCKLESS #endif