Skip to content

Commit 353a292

Browse files
add check for stdatomic.h
1 parent 032ac40 commit 353a292

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ else
100100
fi
101101

102102

103-
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stddef.h time.h sys/ioctl.h sys/socket.h sys/time.h errno.h sys/un.h])
103+
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stddef.h time.h sys/ioctl.h sys/socket.h sys/time.h errno.h sys/un.h stdatomic.h])
104104
AC_CHECK_LIB([network],[socket])
105105
AC_C_BIGENDIAN
106106
AC_C___ATOMIC

wolfssl/wolfcrypt/wc_port.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,12 @@
307307
#define WOLFSSL_ATOMIC_OPS
308308
#endif
309309
#else
310+
#ifdef HAVE_STDATOMIC_H
310311
/* Default C Implementation */
311312
#include <stdatomic.h>
312313
typedef atomic_int wolfSSL_Atomic_Int;
313314
#define WOLFSSL_ATOMIC_OPS
315+
#endif /* HAVE_STDATOMIC_H */
314316
#endif
315317
#elif defined(_MSC_VER)
316318
/* Use MSVC compiler intrinsics for atomic ops */

0 commit comments

Comments
 (0)