ldso: notify the debugger when we're doing a dlopen
[musl.git] / src / fcntl / openat.c
blobad165ec323f77ac3c91b91573f46a3a5802af6c3
1 #include <fcntl.h>
2 #include <stdarg.h>
3 #include "syscall.h"
5 int openat(int fd, const char *filename, int flags, ...)
7 mode_t mode = 0;
9 if ((flags & O_CREAT) || (flags & O_TMPFILE) == O_TMPFILE) {
10 va_list ap;
11 va_start(ap, flags);
12 mode = va_arg(ap, mode_t);
13 va_end(ap);
16 return syscall_cp(SYS_openat, fd, filename, flags|O_LARGEFILE, mode);
19 weak_alias(openat, openat64);