We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae3f52d commit 17a796aCopy full SHA for 17a796a
components/libc/posix/io/stdio/stdio.c
@@ -104,8 +104,12 @@ int rt_posix_stdio_set_console(const char* device_name, int mode)
104
_GLOBAL_REENT->_stderr = std_console;
105
}
106
107
-#if (NEWLIB_VERSION_NUM < 30400U) || (NEWLIB_VERSION_NUM >= 40000U && NEWLIB_VERSION_NUM < 40300U)
108
- _GLOBAL_REENT->__sdidinit = 1; /* __sdidinit is obselete */
+#if defined(_REENT_SMALL) || !defined(__sdidinit)
+ /* Newlib >= 3.4.0 or small reent version: no __sdidinit field */
109
+ /* Do nothing */
110
+#else
111
+ /* Older newlib versions (typically < 3.4.0) still define __sdidinit */
112
+ _GLOBAL_REENT->__sdidinit = 1;
113
#endif
114
115
0 commit comments