easy_lock: switch to using atomic_int instead of bool

To work with more compilers without requiring separate libs to
link. Like with gcc-12 for RISC-V on Linux.

Reported-by: Adam Sampson
Fixes #9055
Closes #9061
This commit is contained in:
Daniel Stenberg 2022-06-28 09:00:25 +02:00
parent e631f6e10e
commit 50efb0822a
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -40,8 +40,8 @@
#include <sched.h>
#endif
#define curl_simple_lock atomic_bool
#define CURL_SIMPLE_LOCK_INIT false
#define curl_simple_lock atomic_int
#define CURL_SIMPLE_LOCK_INIT 0
static inline void curl_simple_lock_lock(curl_simple_lock *lock)
{