diff options
author | Markos Chandras <markos.chandras@imgtec.com> | 2012-10-12 11:28:35 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2013-02-20 13:45:13 +0100 |
commit | 585ee9c4e7025363c048c8487ea60b99fb28977f (patch) | |
tree | e0b76854af7a0f188261ff25cf20c31199a471d9 | |
parent | d62c716242526c61ddd5f5fe5f5fa88cecb14228 (diff) |
open64: Use openat if arch does not have the open syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r-- | libc/sysdeps/linux/common/open64.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/open64.c b/libc/sysdeps/linux/common/open64.c index bbb12cd1a..23a777b47 100644 --- a/libc/sysdeps/linux/common/open64.c +++ b/libc/sysdeps/linux/common/open64.c @@ -21,8 +21,11 @@ int open64(const char *file, int oflag, ...) mode = va_arg (arg, mode_t); va_end (arg); } - +#if defined __NR_openat && !defined __NR_open + return openat(AT_FDCWD, file, oflag | O_LARGEFILE, mode); +#else return open(file, oflag | O_LARGEFILE, mode); +#endif } lt_strong_alias(open64) lt_libc_hidden(open64) |