This and some other GC .c files include gc_pmark.h directly (not
gc_priv.h), so the compiler complains that sigset_t (used in
gc_pthread_redirects.h) is undefined if 'strict ANSI' mode is on and
_GNU_SOURCE is not defined before including system headers.
* include/private/gc_pmark.h [(__linux__ || __GLIBC__ || __GNU__)
&& GC_PTHREADS && !GC_NO_PTHREAD_SIGMASK] (_GNU_SOURCE): Define (before
including other headers).
# define GC_BUILD
#endif
+#if (defined(__linux__) || defined(__GLIBC__) || defined(__GNU__)) \
+ && !defined(_GNU_SOURCE) && defined(GC_PTHREADS) \
+ && !defined(GC_NO_PTHREAD_SIGMASK)
+# define _GNU_SOURCE 1
+#endif
+
#if defined(KEEP_BACK_PTRS) || defined(PRINT_BLACK_LIST)
# include "dbg_mlc.h"
#endif