Skip to content

Commit 82cc988

Browse files
authored
Merge pull request #6495 from JacobBarthelmeh/build
update check for stdatomic header file
2 parents cdb3d6d + 47036d0 commit 82cc988

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

configure.ac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,11 @@ 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 stdatomic.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])
104104
AC_CHECK_LIB([network],[socket])
105105
AC_C_BIGENDIAN
106106
AC_C___ATOMIC
107+
AC_CHECK_HEADER(stdatomic.h, [AM_CPPFLAGS="$AM_CPPFLAGS -DWOLFSSL_HAVE_ATOMIC_H"],[])
107108

108109
# check if functions of interest are linkable, but also check if
109110
# they're declared by the expected headers, and if not, supersede the

wolfssl/wolfcrypt/wc_port.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,12 @@
307307
#define WOLFSSL_ATOMIC_OPS
308308
#endif
309309
#else
310-
#ifdef HAVE_STDATOMIC_H
310+
#ifdef WOLFSSL_HAVE_ATOMIC_H
311311
/* Default C Implementation */
312312
#include <stdatomic.h>
313313
typedef atomic_int wolfSSL_Atomic_Int;
314314
#define WOLFSSL_ATOMIC_OPS
315-
#endif /* HAVE_STDATOMIC_H */
315+
#endif /* WOLFSSL_HAVE_ATOMIC_H */
316316
#endif
317317
#elif defined(_MSC_VER)
318318
/* Use MSVC compiler intrinsics for atomic ops */

0 commit comments

Comments
 (0)