From b78dd64a2bfd18d64608f8592ab4f7ec9ab562de Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sun, 19 Apr 2020 09:31:55 +0300 Subject: Eliminate 'implicit declaration of sbrk' gcc warning if -std=c11 on Cygwin * include/private/gc_priv.h [__CYGWIN__ && !USE_MMAP && !_GNU_SOURCE] (_GNU_SOURCE): Define. --- include/private/gc_priv.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index 5c39d6a5..30974004 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -27,7 +27,8 @@ #endif #if (defined(__linux__) || defined(__GLIBC__) || defined(__GNU__) \ - || (defined(__CYGWIN__) && defined(GC_THREADS))) && !defined(_GNU_SOURCE) + || (defined(__CYGWIN__) && (defined(GC_THREADS) || !defined(USE_MMAP)))) \ + && !defined(_GNU_SOURCE) /* Can't test LINUX, since this must be defined before other includes. */ # define _GNU_SOURCE 1 #endif -- cgit v1.2.1