diff --git a/components/libc/compilers/armlibc/libc.h b/components/libc/compilers/armlibc/libc.h index 5e9f68218d3aa7d01296d59abbdadec33b946bff..aef0324018cdb8563512a0351399653f1e5c7829 100644 --- a/components/libc/compilers/armlibc/libc.h +++ b/components/libc/compilers/armlibc/libc.h @@ -32,6 +32,6 @@ int libc_system_init(void); int libc_stdio_set_console(const char* device_name, int mode); int libc_stdio_read (void *buffer, size_t size); -int libc_stdio_write(void *buffer, size_t size); +int libc_stdio_write(const void *buffer, size_t size); #endif diff --git a/components/libc/compilers/armlibc/stdio.c b/components/libc/compilers/armlibc/stdio.c index 8c9c99b3adaa421eac85e139227b4d1f60683fdf..cba51beb186e6b2d58c525e16b1db7fa005b3bb2 100644 --- a/components/libc/compilers/armlibc/stdio.c +++ b/components/libc/compilers/armlibc/stdio.c @@ -63,7 +63,7 @@ int libc_stdio_read(void *buffer, size_t size) return read(std_fd, buffer, size); } -int libc_stdio_write(void *buffer, size_t size) +int libc_stdio_write(const void *buffer, size_t size) { return write(std_fd, buffer, size); } diff --git a/components/libc/compilers/armlibc/stubs.c b/components/libc/compilers/armlibc/stubs.c index 0de8aacb3c0670ee5a801f62539fa80072d32052..719665b78e4ffb1d01c60bbf5825feaa298a88e0 100644 --- a/components/libc/compilers/armlibc/stubs.c +++ b/components/libc/compilers/armlibc/stubs.c @@ -31,6 +31,7 @@ #include #include "rtthread.h" +#include "libc.h" #ifdef RT_USING_DFS #include "dfs_posix.h"