mirror of
https://git.proxmox.com/git/wasi-libc
synced 2025-06-13 15:56:16 +00:00

* Tidy up some #include names. * Move non-cloudlibc sources out of the cloudlibc directory.
16 lines
358 B
C
16 lines
358 B
C
#include <common/errno.h>
|
|
#include <wasi/core.h>
|
|
#include <wasi/libc.h>
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
|
|
int __wasilibc_unlinkat(int fd, const char *path) {
|
|
size_t path_len = strlen(path);
|
|
__wasi_errno_t error = __wasi_path_unlink_file(fd, path, path_len);
|
|
if (error != 0) {
|
|
errno = error;
|
|
return -1;
|
|
}
|
|
return 0;
|
|
}
|