From 81459c1075a7c286ae666032cf236edbf962cb76 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 23 Mar 2017 09:41:37 +0300 Subject: [PATCH] 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). --- src/atomic_ops.c | 5 +++++ 1 file changed, 5 insertions(+) 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! */ -- 2.40.0