From: Mikael Pettersson Date: Tue, 2 Mar 2021 22:20:06 +0000 (-0700) Subject: [PATCH] Fix Ada bootstrap failure on Cygwin since switch to C++11 (PR98590) X-Git-Tag: basepoints/gcc-12~793 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8b6ebc025cf2b25fdc1e8f6e6261701dc71bac74;p=thirdparty%2Fgcc.git [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. --- diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c index 4e00dedbbd68..8072320ae10c 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 to expose fileno_unlocked() */ +#if defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(_GNU_SOURCE) +#define _GNU_SOURCE +#endif + #include #include #include