]> granicus.if.org Git - libatomic_ops/commitdiff
Fix block_all_signals compilation in 'strict ANSI' mode
authorIvan Maidanski <ivmai@mail.ru>
Thu, 23 Mar 2017 06:41:37 +0000 (09:41 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 31 Mar 2017 07:20:33 +0000 (10:20 +0300)
* src/atomic_ops.c [(__linux__ || __GLIBC__ || __GNU__)
&& !AO_USE_NO_SIGNALS] (_GNU_SOURCE): Define (before including system
headers).

src/atomic_ops.c

index 30dd21cac64a0c49d247f66152119a61d03081de..c9209a3fcbc9dc48d37635d66f2aa7633079c5f5 100644 (file)
 # define AO_USE_NO_SIGNALS
 #endif
 
+#if (defined(__linux__) || defined(__GLIBC__) || defined(__GNU__)) \
+    && !defined(AO_USE_NO_SIGNALS) && !defined(_GNU_SOURCE)
+# define _GNU_SOURCE 1
+#endif
+
 #undef AO_REQUIRE_CAS
 #include "atomic_ops.h" /* Without cas emulation! */