summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-02-20 17:09:21 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-02-20 17:14:28 +0300
commit67cf0572d97c68a4f49f8bc765061f552398d435 (patch)
tree7fa370a025e7c71ffe8a52d8ebe2d90a020348e0
parentc664a6113dafbb4768c67a76a6e3964316f1e35b (diff)
downloadlibatomic_ops-67cf0572d97c68a4f49f8bc765061f552398d435.tar.gz
Fix 'use of undeclared SIG_BLOCK' Clang error if -std=c89 on Cygwin
* src/atomic_ops.c [__CYGWIN__ && !AO_USE_NO_SIGNALS && !_GNU_SOURCE] (_GNU_SOURCE): Define macro.
-rw-r--r--src/atomic_ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/atomic_ops.c b/src/atomic_ops.c
index 0d9ca02..e1dfdb7 100644
--- a/src/atomic_ops.c
+++ b/src/atomic_ops.c
@@ -45,7 +45,8 @@
# define AO_USE_NO_SIGNALS
#endif
-#if (defined(__linux__) || defined(__GLIBC__) || defined(__GNU__)) \
+#if (defined(__CYGWIN__) || defined(__GLIBC__) || defined(__GNU__) \
+ || defined(__linux__)) \
&& !defined(AO_USE_NO_SIGNALS) && !defined(_GNU_SOURCE)
# define _GNU_SOURCE 1
#endif