]> git.proxmox.com Git - wasi-libc.git/blob - libc-bottom-half/sources/__wasilibc_unlinkat.c
Update to the next version of the `witx` crate (#234)
[wasi-libc.git] / libc-bottom-half / sources / __wasilibc_unlinkat.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_unlinkat(int fd, const char *path) {
7 __wasi_errno_t error = __wasi_path_unlink_file(fd, path);
8 if (error != 0) {
9 errno = error;
10 return -1;
11 }
12 return 0;
13 }