diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 16:08:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 16:08:03 +0000 |
commit | f1db79e6e5c383cf76f3bf0dd42115d19591a72b (patch) | |
tree | 3f9509008e8a130c45b7e31b1520d66d720493ec /libc-bottom-half/sources/posix.c | |
parent | Adding upstream version 0.0~git20230821.ec4566b. (diff) | |
download | wasi-libc-upstream.tar.xz wasi-libc-upstream.zip |
Adding upstream version 0.0~git20240411.9e8c542.upstream/0.0_git20240411.9e8c542upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libc-bottom-half/sources/posix.c')
-rw-r--r-- | libc-bottom-half/sources/posix.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/libc-bottom-half/sources/posix.c b/libc-bottom-half/sources/posix.c index b3e59ec..7da6a3d 100644 --- a/libc-bottom-half/sources/posix.c +++ b/libc-bottom-half/sources/posix.c @@ -6,6 +6,7 @@ #include <fcntl.h> #include <stdlib.h> #include <sys/stat.h> +#include <sys/statvfs.h> #include <unistd.h> #include <utime.h> #include <wasi/libc.h> @@ -310,6 +311,46 @@ int rename(const char *old, const char *new) { return -1; } +int chmod(const char *path, mode_t mode) { + // TODO: We plan to support this eventually in WASI, but not yet. + // Meanwhile, we provide a stub so that libc++'s `<filesystem>` + // implementation will build unmodified. + errno = ENOSYS; + return -1; +} + +int fchmod(int fd, mode_t mode) { + // TODO: We plan to support this eventually in WASI, but not yet. + // Meanwhile, we provide a stub so that libc++'s `<filesystem>` + // implementation will build unmodified. + errno = ENOSYS; + return -1; +} + +int fchmodat(int fd, const char *path, mode_t mode, int flag) { + // TODO: We plan to support this eventually in WASI, but not yet. + // Meanwhile, we provide a stub so that libc++'s `<filesystem>` + // implementation will build unmodified. + errno = ENOSYS; + return -1; +} + +int statvfs(const char *__restrict path, struct statvfs *__restrict buf) { + // TODO: We plan to support this eventually in WASI, but not yet. + // Meanwhile, we provide a stub so that libc++'s `<filesystem>` + // implementation will build unmodified. + errno = ENOSYS; + return -1; +} + +int fstatvfs(int fd, struct statvfs *buf) { + // TODO: We plan to support this eventually in WASI, but not yet. + // Meanwhile, we provide a stub so that libc++'s `<filesystem>` + // implementation will build unmodified. + errno = ENOSYS; + return -1; +} + // Like `access`, but with `faccessat`'s flags argument. int __wasilibc_access(const char *path, int mode, int flags) |