mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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>
This commit is contained in:
@ -23,13 +23,6 @@
|
||||
#include <sysdep-cancel.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
|
||||
#ifdef __OFF_T_MATCHES_OFF64_T
|
||||
# define EXTRA_OPEN_FLAGS 0
|
||||
#else
|
||||
# define EXTRA_OPEN_FLAGS O_LARGEFILE
|
||||
#endif
|
||||
|
||||
/* Open FILE with access OFLAG. If O_CREAT or O_TMPFILE is in OFLAG,
|
||||
a third argument is the file protection. */
|
||||
int
|
||||
@ -45,7 +38,7 @@ __libc_open64 (const char *file, int oflag, ...)
|
||||
va_end (arg);
|
||||
}
|
||||
|
||||
return SYSCALL_CANCEL (openat, AT_FDCWD, file, oflag | EXTRA_OPEN_FLAGS,
|
||||
return SYSCALL_CANCEL (openat, AT_FDCWD, file, oflag | O_LARGEFILE,
|
||||
mode);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user