zig/lib/libc/wasi/libc-bottom-half/sources/__wasilibc_rmdirat.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
286 B
C
Vendored

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