summaryrefslogtreecommitdiff
path: root/components/libc/compilers
diff options
context:
space:
mode:
authorgreedyhao <[email protected]>2021-08-11 09:42:24 +0800
committergreedyhao <[email protected]>2021-08-11 09:42:24 +0800
commit3fae2266303f4e7424d333ebdb68eaab740e10d6 (patch)
tree34f8c14f3e0fc6058f6481b481d254170a891526 /components/libc/compilers
parenta6df4391edc58dde02abc5bb20a64d5e2801ad9a (diff)
[newlib] fix compile error when closing RT_USING_CONSOLE
Diffstat (limited to 'components/libc/compilers')
-rw-r--r--components/libc/compilers/newlib/syscalls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/libc/compilers/newlib/syscalls.c b/components/libc/compilers/newlib/syscalls.c
index e01dc59eb6..aeb4d123e7 100644
--- a/components/libc/compilers/newlib/syscalls.c
+++ b/components/libc/compilers/newlib/syscalls.c
@@ -210,7 +210,7 @@ int _wait_r(struct _reent *ptr, int *status)
_ssize_t _write_r(struct _reent *ptr, int fd, const void *buf, size_t nbytes)
{
#ifndef RT_USING_DFS
-#ifdef RT_USING_DEVICE
+#if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE)
if (fileno(stdout) == fd)
{
rt_device_t console;