]> git.proxmox.com Git - wasi-libc.git/blame - libc-bottom-half/cloudlibc/src/libc/unistd/__wasilibc_rmfileat.c
Add __restrict qualifiers to the fstatat declaration.
[wasi-libc.git] / libc-bottom-half / cloudlibc / src / libc / unistd / __wasilibc_rmfileat.c
CommitLineData
320054e8
DG
1#include <common/errno.h>
2#include <wasi/core.h>
7ba6adfc 3#include <wasi/libc.h>
320054e8
DG
4#include <errno.h>
5#include <string.h>
6
7int __wasilibc_rmfileat(int fd, const char *path) {
8 size_t path_len = strlen(path);
9 __wasi_errno_t error = __wasi_path_unlink_file(fd, path, path_len);
10 if (error != 0) {
11 errno = error;
12 return -1;
13 }
14 return 0;
15}