openssl: crypto/threads_pthread.c: compilation fails on RHEL 6 and SLES 11
There’s a copy and paste error in crypto/threads_pthread.c likely introduced by #26478. Lines 196 and 214 are the same. Compilation error:
crypto/threads_pthread.c:214: error: redefinition of 'fallback_atomic_exchange_n_uint64_t'
crypto/threads_pthread.c:196: note: previous definition of 'fallback_atomic_exchange_n_uint64_t' was here
crypto/threads_pthread.c: In function 'update_qp':
crypto/threads_pthread.c:564: warning: implicit declaration of function 'fallback_atomic_compare_exchange_n_uint64_t'
crypto/threads_pthread.c:564: error: '__ATOMIC_ACQ_REL' undeclared (first use in this function)
crypto/threads_pthread.c:564: error: (Each undeclared identifier is reported only once
crypto/threads_pthread.c:564: error: for each function it appears in.)
crypto/threads_pthread.c:564: error: '__ATOMIC_RELAXED' undeclared (first use in this function)
The trivial patch should be:
--- crypto/threads_pthread.c 2025-02-11 21:59:59.585719305 +0100
+++ crypto/threads_pthread.c 2025-02-11 22:42:55.183159198 +0100
@@ -211,7 +211,7 @@
return ret; \
}
-IMPL_fallback_atomic_exchange_n(uint64_t)
+IMPL_fallback_atomic_compare_exchange_n(uint64_t)
# define ATOMIC_COMPARE_EXCHANGE_N(t, p, e, d, s, f) fallback_atomic_compare_exchange_n_##t(p, e, d, s, f)
Observed for OpenSSL 3.4.1. Code seems to contain the same problem for main. I didn’t check which other versions might also be broken.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (13 by maintainers)
The patch needs to be enhanced, maybe:
But even then, the second part of the error still happens: