diff --git a/components/newlib/src/syscalls.c b/components/newlib/src/syscalls.c index 2eb8f5011a..ed5ee9f03a 100644 --- a/components/newlib/src/syscalls.c +++ b/components/newlib/src/syscalls.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -12,6 +12,10 @@ #include #include +#if CONFIG_IDF_TOOLCHAIN_GCC +#include +#endif + #if CONFIG_LIBC_PICOLIBC int open(const char *pathname, int flags, ...) { @@ -127,6 +131,22 @@ int system(const char* str) return _system_r(__getreent(), str); } +#if CONFIG_IDF_TOOLCHAIN_GCC +int statvfs(const char *restrict path, struct statvfs *restrict buf) +{ + /* TODO IDF-9879 */ + errno = ENOSYS; + return -1; +} + +int fstatvfs(int fd, struct statvfs *buf) +{ + /* TODO IDF-9879 */ + errno = ENOSYS; + return -1; +} +#endif + void esp_libc_include_syscalls_impl(void) { }