]> git.proxmox.com Git - wasi-libc.git/blob - libc-bottom-half/cloudlibc/src/libc/sys/stat/mkdirat.c
Fix missing errno assignments.
[wasi-libc.git] / libc-bottom-half / cloudlibc / src / libc / sys / stat / mkdirat.c
1 // Copyright (c) 2015-2016 Nuxi, https://nuxi.nl/
2 //
3 // SPDX-License-Identifier: BSD-2-Clause
4
5 #include <sys/stat.h>
6
7 #include <wasi/api.h>
8 #include <errno.h>
9 #include <string.h>
10
11 int __wasilibc_nocwd_mkdirat_nomode(int fd, const char *path) {
12 __wasi_errno_t error = __wasi_path_create_directory(fd, path);
13 if (error != 0) {
14 errno = error;
15 return -1;
16 }
17 return 0;
18 }