feat(newlib): add dummy implementations for statvfs/fstatvfs

This commit is contained in:
Alexey Lapshin
2025-05-16 23:57:44 +07:00
parent fdb4212f7d
commit 0f2e45c1ad

View File

@@ -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 <sys/time.h>
#include <sys/stat.h>
#if CONFIG_IDF_TOOLCHAIN_GCC
#include <sys/statvfs.h>
#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)
{
}