From 9629ec0b7a2e657d693960269506fcc6c715c6ff Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 7 Jun 2022 07:55:02 +0200 Subject: [PATCH] Fix __sglue inititialization Do not initialize __sglue with the FILE objects of _GLOBAL_REENT to avoid a double use in the !_REENT_SMALL and !_REENT_GLOBAL_STDIO_STREAMS configurations which didn't use a thread-specific reentrancy structure. --- newlib/libc/stdio/findfp.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c index 6933ff1db..ff6804d19 100644 --- a/newlib/libc/stdio/findfp.c +++ b/newlib/libc/stdio/findfp.c @@ -41,11 +41,7 @@ const struct __sFILE_fake __sf_fake_stderr = __FILE __sf[3]; struct _glue __sglue = {NULL, 3, &__sf[0]}; #else -#ifdef _REENT_SMALL struct _glue __sglue = {NULL, 0, NULL}; -#else -struct _glue __sglue = {NULL, 3, &_GLOBAL_REENT->__sf[0]}; -#endif #endif #ifdef _STDIO_BSD_SEMANTICS -- 2.35.3