aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Pettersson <mikpelinux@gmail.com>2021-03-02 15:20:06 -0700
committerJeff Law <law@redhat.com>2021-03-02 15:20:06 -0700
commit8b6ebc025cf2b25fdc1e8f6e6261701dc71bac74 (patch)
tree3f5611fbf1c90befb9f49a891acd72e74ec8715e
parentd1776b7757001d9da47efcfd64d3bb20afb8d96d (diff)
downloadgcc-8b6ebc025cf2b25fdc1e8f6e6261701dc71bac74.zip
gcc-8b6ebc025cf2b25fdc1e8f6e6261701dc71bac74.tar.gz
gcc-8b6ebc025cf2b25fdc1e8f6e6261701dc71bac74.tar.bz2
[PATCH] Fix Ada bootstrap failure on Cygwin since switch to C++11 (PR98590)
gcc/ada PR bootstrap/98590 * cstreams.c: Ensure fileno_unlocked() is visible on Cygwin.
-rw-r--r--gcc/ada/cstreams.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c
index 4e00ded..8072320 100644
--- a/gcc/ada/cstreams.c
+++ b/gcc/ada/cstreams.c
@@ -37,6 +37,11 @@
#define _FILE_OFFSET_BITS 64
/* the define above will make off_t a 64bit type on GNU/Linux */
+/* Tell Cygwin's <stdio.h> to expose fileno_unlocked() */
+#if defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(_GNU_SOURCE)
+#define _GNU_SOURCE
+#endif
+
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>