From 4dfa8f4870c862540bd9b09130a68664d45f1569 Mon Sep 17 00:00:00 2001 From: Stafford Horne Date: Sun, 26 Dec 2021 15:24:53 +0900 Subject: 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 --- sysdeps/unix/sysv/linux/openat64_nocancel.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'sysdeps/unix/sysv/linux/openat64_nocancel.c') diff --git a/sysdeps/unix/sysv/linux/openat64_nocancel.c b/sysdeps/unix/sysv/linux/openat64_nocancel.c index 51377aea45..b9c0d98770 100644 --- a/sysdeps/unix/sysv/linux/openat64_nocancel.c +++ b/sysdeps/unix/sysv/linux/openat64_nocancel.c @@ -22,12 +22,6 @@ #include #include -#ifdef __OFF_T_MATCHES_OFF64_T -# define EXTRA_OPEN_FLAGS 0 -#else -# define EXTRA_OPEN_FLAGS O_LARGEFILE -#endif - int __openat64_nocancel (int fd, const char *file, int oflag, ...) { @@ -40,7 +34,7 @@ __openat64_nocancel (int fd, const char *file, int oflag, ...) va_end (arg); } - return INLINE_SYSCALL_CALL (openat, fd, file, oflag | EXTRA_OPEN_FLAGS, + return INLINE_SYSCALL_CALL (openat, fd, file, oflag | O_LARGEFILE, mode); } hidden_def (__openat64_nocancel) -- cgit v1.2.3-70-g09d2