]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
easy_lock: check for HAVE_STDATOMIC_H as well
authorDon Olmstead <don.j.olmstead@gmail.com>
Mon, 17 Oct 2022 23:58:50 +0000 (16:58 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 21 Oct 2022 07:23:02 +0000 (09:23 +0200)
The check for `HAVE_STDATOMIC_H` looks to see if the `stdatomic.h`
header is present.

Closes #9755

lib/easy_lock.h

index 4c22be5f8aac09b5eff5029fde13eb33509eb8d3..d96e56b8d8ebf364bda002246bca25286051947a 100644 (file)
@@ -47,7 +47,7 @@ typedef PVOID SRWLOCK, *PSRWLOCK;
 #define curl_simple_lock_lock(m) AcquireSRWLockExclusive(m)
 #define curl_simple_lock_unlock(m) ReleaseSRWLockExclusive(m)
 
-#elif defined (HAVE_ATOMIC)
+#elif defined(HAVE_ATOMIC) && defined(HAVE_STDATOMIC_H)
 #include <stdatomic.h>
 #if defined(HAVE_SCHED_YIELD)
 #include <sched.h>