diff options
Diffstat (limited to 'components/libc/compilers/armlibc')
| -rw-r--r-- | components/libc/compilers/armlibc/libc_syms.c | 1 | ||||
| -rw-r--r-- | components/libc/compilers/armlibc/syscalls.c | 4 |
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) { |
