Browse Source

easy_lock: check for HAVE_STDATOMIC_H as well

The check for `HAVE_STDATOMIC_H` looks to see if the `stdatomic.h`
header is present.

Closes #9755
Don Olmstead 1 year ago
parent
commit
2e69df0a26
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/easy_lock.h

+ 1 - 1
lib/easy_lock.h

@@ -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>