summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/open64.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/open64.c')
-rw-r--r--sysdeps/unix/sysv/linux/open64.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/open64.c b/sysdeps/unix/sysv/linux/open64.c
index a38a31b7a0..c52ce39db1 100644
--- a/sysdeps/unix/sysv/linux/open64.c
+++ b/sysdeps/unix/sysv/linux/open64.c
@@ -63,6 +63,15 @@ __open64_2 (file, oflag)
if (oflag & O_CREAT)
__fortify_fail ("invalid open64 call: O_CREAT without mode");
- return __open64 (file, oflag);
+ if (SINGLE_THREAD_P)
+ return INLINE_SYSCALL (open, 2, file, oflag | O_LARGEFILE);
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ int result = INLINE_SYSCALL (open, 2, file, oflag | O_LARGEFILE);
+
+ LIBC_CANCEL_RESET (oldtype);
+
+ return result;
}
#endif