mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 05:34:32 +02:00
feat(newlib): add dummy implementations for statvfs/fstatvfs
This commit is contained in:
@@ -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
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -12,6 +12,10 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#if CONFIG_IDF_TOOLCHAIN_GCC
|
||||||
|
#include <sys/statvfs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if CONFIG_LIBC_PICOLIBC
|
#if CONFIG_LIBC_PICOLIBC
|
||||||
int open(const char *pathname, int flags, ...)
|
int open(const char *pathname, int flags, ...)
|
||||||
{
|
{
|
||||||
@@ -127,6 +131,22 @@ int system(const char* str)
|
|||||||
return _system_r(__getreent(), 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)
|
void esp_libc_include_syscalls_impl(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user