diff options
author | Stafford Horne <shorne@gmail.com> | 2021-12-26 15:24:53 +0900 |
---|---|---|
committer | Stafford Horne <shorne@gmail.com> | 2021-12-31 07:10:19 +0900 |
commit | 4dfa8f4870c862540bd9b09130a68664d45f1569 (patch) | |
tree | d777f42db0649f069ab798cb5a09e1fe50a33e5f /sysdeps/unix/sysv/linux/open64_nocancel.c | |
parent | c21c7bc24ec58c516d1608695d9c5a86f2f2fc0c (diff) | |
download | glibc-4dfa8f4870c862540bd9b09130a68664d45f1569.tar.gz glibc-4dfa8f4870c862540bd9b09130a68664d45f1569.tar.xz glibc-4dfa8f4870c862540bd9b09130a68664d45f1569.zip |
open64: Force O_LARGEFILE on all architectures
When running tests on OpenRISC which has 32-bit wordsize but 64-bit timesize it was found that O_LARGEFILE is not being set when calling open64. For 64-bit architectures the O_LARGEFILE flag is generally implied by the kernel according to force_o_largefile. However, for 32-bit architectures this is not done. For this patch we unconditionally now set the O_LARGEFILE flag for open64 class syscalls as there is no harm in doing so. Tested on the OpenRISC the build works and timezone/tst-tzset passes which was failing before. I would expect this also would fix arc. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix/sysv/linux/open64_nocancel.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/open64_nocancel.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/open64_nocancel.c b/sysdeps/unix/sysv/linux/open64_nocancel.c index d7f35656a1..a270891dc8 100644 --- a/sysdeps/unix/sysv/linux/open64_nocancel.c +++ b/sysdeps/unix/sysv/linux/open64_nocancel.c @@ -23,12 +23,6 @@ #include <not-cancel.h> -#ifdef __OFF_T_MATCHES_OFF64_T -# define EXTRA_OPEN_FLAGS 0 -#else -# define EXTRA_OPEN_FLAGS O_LARGEFILE -#endif - int __open64_nocancel (const char *file, int oflag, ...) { @@ -42,7 +36,7 @@ __open64_nocancel (const char *file, int oflag, ...) va_end (arg); } - return INLINE_SYSCALL_CALL (openat, AT_FDCWD, file, oflag | EXTRA_OPEN_FLAGS, + return INLINE_SYSCALL_CALL (openat, AT_FDCWD, file, oflag | O_LARGEFILE, mode); } |