summaryrefslogtreecommitdiff
path: root/components/libc/compilers/armlibc
diff options
context:
space:
mode:
authorGabriel Wang <[email protected]>2022-01-08 20:07:54 +0000
committerGitHub <[email protected]>2022-01-08 20:07:54 +0000
commit844f2ef76ffa47a14c1184510f41cedd8375039e (patch)
treeb3f1fdf9885deca1c04c4c454db90f894dcb0e56 /components/libc/compilers/armlibc
parent6bb9e546de6273725c01ba7020ef33d232af8a2b (diff)
parentdd62b2b10671c2b141ef75b848467d8351b5bfee (diff)
Merge branch 'master' into master
Diffstat (limited to 'components/libc/compilers/armlibc')
-rw-r--r--components/libc/compilers/armlibc/libc_syms.c1
-rw-r--r--components/libc/compilers/armlibc/syscalls.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/components/libc/compilers/armlibc/libc_syms.c b/components/libc/compilers/armlibc/libc_syms.c
index 829d57b559..2b370a25a6 100644
--- a/components/libc/compilers/armlibc/libc_syms.c
+++ b/components/libc/compilers/armlibc/libc_syms.c
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
*/
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/components/libc/compilers/armlibc/syscalls.c b/components/libc/compilers/armlibc/syscalls.c
index f4ced9d3c0..82c0f38b4f 100644
--- a/components/libc/compilers/armlibc/syscalls.c
+++ b/components/libc/compilers/armlibc/syscalls.c
@@ -204,7 +204,7 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode)
if (fh == STDOUT || fh == STDERR)
{
-#ifdef RT_USING_CONSOLE
+#if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE)
rt_device_t console;
console = rt_console_get_device();
if (console)
@@ -214,7 +214,7 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode)
return 0; /* success */
#else
return 0; /* error */
-#endif /* RT_USING_CONSOLE */
+#endif /* defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE) */
}
else if (fh == STDIN)
{