summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2020-04-19 09:31:55 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-08-21 01:04:29 +0300
commitfc6befdde515249ef450369b5b01462007973b8e (patch)
tree057f39fab6f4333df6a67f2f540408b76cb6f1a9
parent28ef4eeca3eb3ad231b6b4d540b6a9a739f93293 (diff)
downloadbdwgc-fc6befdde515249ef450369b5b01462007973b8e.tar.gz
Eliminate 'implicit declaration of sbrk' gcc warning if -std=c11 on Cygwin
(a cherry-pick of commit b78dd64a2 from 'master') * include/private/gc_priv.h [__CYGWIN__ && !USE_MMAP && !_GNU_SOURCE] (_GNU_SOURCE): Define.
-rw-r--r--include/private/gc_priv.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h
index 6999df71..6f515d23 100644
--- a/include/private/gc_priv.h
+++ b/include/private/gc_priv.h
@@ -26,7 +26,8 @@
# define GC_BUILD
#endif
-#if (defined(__linux__) || defined(__GLIBC__) || defined(__GNU__)) \
+#if (defined(__linux__) || defined(__GLIBC__) || defined(__GNU__) \
+ || (defined(__CYGWIN__) && !defined(USE_MMAP))) \
&& !defined(_GNU_SOURCE)
/* Can't test LINUX, since this must be defined before other includes. */
# define _GNU_SOURCE 1