summaryrefslogtreecommitdiffstats
path: root/libc-bottom-half/sources/posix.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libc-bottom-half/sources/posix.c41
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)