zig/lib/libc/wasi/libc-bottom-half/sources/__wasilibc_unlinkat.c
Frank Denis da9c530d99
Update wasi-libc to a00bf321eeeca836ee2a0d2d25aeb8524107b8cc (#13626)
* Update wasi-libc to a00bf321eeeca836ee2a0d2d25aeb8524107b8cc

It includes a port of emscripten's allocator that performs
performs much better than the old one.

Most importantly, it includes the prerequisites to later add
support for POSIX threads.
2022-11-28 19:58:03 +01:00

12 lines
282 B
C
Vendored

#include <wasi/api.h>
#include <wasi/libc.h>
#include <errno.h>
int __wasilibc_nocwd___wasilibc_unlinkat(int fd, const char *path) {
__wasi_errno_t error = __wasi_path_unlink_file(fd, path);
if (error != 0) {
errno = error;
return -1;
}
return 0;
}