summaryrefslogtreecommitdiff
path: root/lib/libc/stat/mkdir.c
blob: 58de4a896d688c897dfc4fc6bba0769a96c3dbfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "asm/unistd_64.h" // for __NR_mkdir

#include <sys/stat.h>  // for mkdir
#include <sys/types.h> // for mode_t
#include <syscall.h>   // for __syscall_2, syscall

int mkdir(const char *path, mode_t mode)
{
#ifdef __NR_mkdir
	return syscall(mkdir, path, mode);
#else
	return syscall(mkdirat, AT_FDCWD, path, mode);
#endif
}