summaryrefslogtreecommitdiff
path: root/components/libc/newlib/libc.c
diff options
context:
space:
mode:
Diffstat (limited to 'components/libc/newlib/libc.c')
-rw-r--r--components/libc/newlib/libc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/libc/newlib/libc.c b/components/libc/newlib/libc.c
index bd3797b6c4..797c393db8 100644
--- a/components/libc/newlib/libc.c
+++ b/components/libc/newlib/libc.c
@@ -10,6 +10,7 @@ void libc_system_init(const char* tty_name)
int fd;
extern int pthread_system_init(void);
+#ifdef RT_USING_DFS
#ifndef RT_USING_DFS_DEVFS
#error Please enable devfs by defining RT_USING_DFS_DEVFS in rtconfig.h
#endif
@@ -21,6 +22,7 @@ void libc_system_init(const char* tty_name)
fd = open("/dev/console", O_RDONLY, 0); /* for stdin */
fd = open("/dev/console", O_WRONLY, 0); /* for stdout */
fd = open("/dev/console", O_WRONLY, 0); /* for stderr */
+#endif
/* set PATH and HOME */
putenv("PATH=/");