From 3fae2266303f4e7424d333ebdb68eaab740e10d6 Mon Sep 17 00:00:00 2001 From: greedyhao Date: Wed, 11 Aug 2021 09:42:24 +0800 Subject: [PATCH] [newlib] fix compile error when closing RT_USING_CONSOLE --- components/libc/compilers/newlib/syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- GitLab