File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
components/libc/posix/io/stdio Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ INIT_ENV_EXPORT(rt_posix_stdio_init);
47
47
48
48
#if defined(RT_USING_NEWLIBC )
49
49
50
+ #define NEWLIB_VERSION_NUM (__NEWLIB__ * 10000U + __NEWLIB_MINOR__ * 100U + __NEWLIB_PATCHLEVEL__)
51
+
50
52
static FILE * std_console = NULL ;
51
53
int rt_posix_stdio_set_console (const char * device_name , int mode )
52
54
{
@@ -102,7 +104,9 @@ int rt_posix_stdio_set_console(const char* device_name, int mode)
102
104
_GLOBAL_REENT -> _stderr = std_console ;
103
105
}
104
106
105
- _GLOBAL_REENT -> __sdidinit = 1 ;
107
+ #if (NEWLIB_VERSION_NUM < 30400U ) || (NEWLIB_VERSION_NUM >= 40000U && NEWLIB_VERSION_NUM < 40300U )
108
+ _GLOBAL_REENT -> __sdidinit = 1 ; /* __sdidinit is obselete */
109
+ #endif
106
110
}
107
111
108
112
if (std_console )
You can’t perform that action at this time.
0 commit comments