[PATCH] Cygwin: syscalls.cc: Include ../stdio/local.h

Sebastian Huber sebastian.huber@embedded-brains.de
Thu May 12 06:49:16 GMT 2022


Include Newlib internal ../stdio/local.h for the _fwalk_reent() declaration.
---
 winsup/cygwin/syscalls.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 1cecaa017..885498a1a 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -64,6 +64,8 @@ details. */
 #include "child_info.h"
 #include <cygwin/fs.h>  /* needed for RENAME_NOREPLACE */
 
+#include "../../newlib/libc/stdio/local.h" /* needed for _fwalk_reent() */
+
 #undef _close
 #undef _lseek
 #undef _open
@@ -3057,9 +3059,6 @@ _cygwin_istext_for_stdio (int fd)
   return 1;
 }
 
-/* internal newlib function */
-extern "C" int _fwalk_reent (struct _reent *ptr, int (*function) (struct _reent *, FILE *));
-
 static int
 setmode_helper (struct _reent *ptr __unused, FILE *f)
 {
-- 
2.35.3



More information about the Newlib mailing list