]> git.proxmox.com Git - wasi-libc.git/blob - libc-bottom-half/sources/__wasilibc_rmdirat.c
Update to the next version of the `witx` crate (#234)
[wasi-libc.git] / libc-bottom-half / sources / __wasilibc_rmdirat.c
1 #include <common/errno.h>
2 #include <wasi/api.h>
3 #include <wasi/libc.h>
4 #include <errno.h>
5
6 int __wasilibc_nocwd___wasilibc_rmdirat(int fd, const char *path) {
7 __wasi_errno_t error = __wasi_path_remove_directory(fd, path);
8 if (error != 0) {
9 errno = errno_fixup_directory(fd, error);
10 return -1;
11 }
12 return 0;
13 }