include cleanups: remove unused headers and add feature test macros
[musl] / src / fcntl / openat.c
1 #include <fcntl.h>
2 #include <stdarg.h>
3 #include "syscall.h"
4 #include "libc.h"
5
6 int openat(int fd, const char *filename, int flags, ...)
7 {
8         mode_t mode;
9         va_list ap;
10         va_start(ap, flags);
11         mode = va_arg(ap, mode_t);
12         va_end(ap);
13         return syscall_cp(SYS_openat, fd, filename, flags|O_LARGEFILE, mode);
14 }
15
16 LFS64(openat);