diff --git a/components/libc/compilers/armlibc/libc.c b/components/libc/compilers/armlibc/libc.c index d3a4ad06d0..c3fab19fdc 100644 --- a/components/libc/compilers/armlibc/libc.c +++ b/components/libc/compilers/armlibc/libc.c @@ -42,7 +42,7 @@ int libc_system_init(void) dev_console = rt_console_get_device(); if (dev_console) { - #if defined(RT_USING_POSIX_STDIN) + #if defined(RT_USING_POSIX) libc_stdio_set_console(dev_console->parent.name, O_RDWR); #else libc_stdio_set_console(dev_console->parent.name, O_WRONLY); diff --git a/components/libc/compilers/dlib/libc.c b/components/libc/compilers/dlib/libc.c index ba998e9747..fe219537e3 100644 --- a/components/libc/compilers/dlib/libc.c +++ b/components/libc/compilers/dlib/libc.c @@ -42,7 +42,7 @@ int libc_system_init(void) dev_console = rt_console_get_device(); if (dev_console) { - #if defined(RT_USING_POSIX_STDIN) + #if defined(RT_USING_POSIX) libc_stdio_set_console(dev_console->parent.name, O_RDWR); #else libc_stdio_set_console(dev_console->parent.name, O_WRONLY);