From: Bernd Edlinger Date: Wed, 19 Feb 2025 13:40:44 +0000 (+0100) Subject: Make CRYPTO_atomic_load/store use the same preprocessor guards X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2cc1974eedd9c41797fef613570261cc68c2baa;p=thirdparty%2Fopenssl.git Make CRYPTO_atomic_load/store use the same preprocessor guards as the other CRYPTO_atomic_X functions. All CRYPTO_atomic functions should use the same logic here, just in case... Reviewed-by: Tomas Mraz Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/26815) (cherry picked from commit 3240427a8530f5aa6070f135e954e20e591fa132) --- diff --git a/crypto/threads_pthread.c b/crypto/threads_pthread.c index 801855c9306..f177fff4245 100644 --- a/crypto/threads_pthread.c +++ b/crypto/threads_pthread.c @@ -250,7 +250,7 @@ int CRYPTO_atomic_or(uint64_t *val, uint64_t op, uint64_t *ret, int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock) { -# if defined(__GNUC__) && defined(__ATOMIC_ACQUIRE) && !defined(BROKEN_CLANG_ATOMICS) +# if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS) if (__atomic_is_lock_free(sizeof(*val), val)) { __atomic_load(val, ret, __ATOMIC_ACQUIRE); return 1;