From: Ivan Maidanski Date: Thu, 23 Mar 2017 06:41:37 +0000 (+0300) Subject: Fix block_all_signals compilation in 'strict ANSI' mode X-Git-Tag: v7.4.6~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81459c1075a7c286ae666032cf236edbf962cb76;p=libatomic_ops Fix block_all_signals compilation in 'strict ANSI' mode * src/atomic_ops.c [(__linux__ || __GLIBC__ || __GNU__) && !AO_USE_NO_SIGNALS] (_GNU_SOURCE): Define (before including system headers). --- diff --git a/src/atomic_ops.c b/src/atomic_ops.c index 30dd21c..c9209a3 100644 --- a/src/atomic_ops.c +++ b/src/atomic_ops.c @@ -43,6 +43,11 @@ # 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! */