headers/bsd: Add sys/queue.h.
[haiku.git] / src / system / libroot / posix / sys / mkdir.c
blob5731968910be66763c73545129d94ddd14e9ee18
1 /*
2 * Copyright 2002-2009, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
4 */
7 #include <errno.h>
8 #include <sys/stat.h>
10 #include <errno_private.h>
11 #include <syscalls.h>
12 #include <syscall_utils.h>
13 #include <umask.h>
16 int
17 mkdir(const char* path, mode_t mode)
19 RETURN_AND_SET_ERRNO(_kern_create_dir(-1, path, mode & ~__gUmask));
23 int
24 mkdirat(int fd, const char *path, mode_t mode)
26 RETURN_AND_SET_ERRNO(_kern_create_dir(fd, path, mode & ~__gUmask));