aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/fcloseall.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/fcloseall.c')
-rw-r--r--newlib/libc/stdio/fcloseall.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/newlib/libc/stdio/fcloseall.c b/newlib/libc/stdio/fcloseall.c
index f14c28d..642dc7d 100644
--- a/newlib/libc/stdio/fcloseall.c
+++ b/newlib/libc/stdio/fcloseall.c
@@ -59,7 +59,12 @@ Required OS subroutines: <<close>>, <<fstat>>, <<isatty>>, <<lseek>>,
int
_fcloseall_r (struct _reent *ptr)
{
+#ifdef _REENT_GLOBAL_STDIO_STREAMS
+ /* There are no thread-specific FILE objects */
+ return 0;
+#else
return _fwalk_sglue (ptr, _fclose_r, &ptr->__sglue);
+#endif
}
#ifndef _REENT_ONLY