Skip to content

Commit d392951

Browse files
authored
Merge pull request #8885 from embhorn/zd20088
Check for STDC_NO_ATOMICS
2 parents 6b68797 + 9defad0 commit d392951

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

.wolfssl_known_macro_extras

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,3 +1042,4 @@ ssize_t
10421042
sun
10431043
versal
10441044
wc_Tls13_HKDF_Expand_Label
1045+
__STDC_NO_ATOMICS__

wolfssl/wolfcrypt/wc_port.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,8 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
15241524
#ifndef WOLFSSL_NO_FENCE
15251525
#ifdef XFENCE
15261526
/* use user-supplied XFENCE definition. */
1527-
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
1527+
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \
1528+
!defined(__STDC_NO_ATOMICS__)
15281529
#include <stdatomic.h>
15291530
#define XFENCE() atomic_thread_fence(memory_order_seq_cst)
15301531
#elif defined(__GNUC__) && (__GNUC__ == 4) && \

0 commit comments

Comments
 (0)