With time64 enabled we have to use statx() instead of stat() or fstat()
If the _dl_fstat implementation isn't selected correctly
we can have multiple errors inside dynamic linker
during startup of the system and of the almost every process
Signed-off-by: Dmitry Chestnykh <dm.chestnykh(a)gmail.com>
---
ldso/include/dl-syscall.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h
index 180d03012..4b0d0f395 100644
--- a/ldso/include/dl-syscall.h
+++ b/ldso/include/dl-syscall.h
@@ -168,7 +168,7 @@ static __always_inline int _dl_stat(const char *file_name,
#if defined __NR_fstat64 && !defined __NR_fstat &&
(!defined(__UCLIBC_USE_TIME64__) || defined(__sparc__))
# define __NR__dl_fstat __NR_fstat64
static __always_inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf)
-#elif defined __NR_fstat
+#elif defined __NR_fstat && !defined __UCLIBC_USE_TIME64__
# define __NR__dl_fstat __NR_fstat
static __always_inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf)
#elif defined __NR_statx && defined __UCLIBC_HAVE_STATX__
--
2.46.0
Show replies by date
This reverts commit dd01754e21da71706af07f3e56eade66fc9164fb.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh(a)gmail.com>
---
extra/Configs/Config.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index 86bd20d76..454b6ddb8 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -1032,7 +1032,7 @@ config UCLIBC_USE_TIME64
TARGET_i386 || \
TARGET_m68k || \
TARGET_microblaze || \
- (TARGET_mips && !(CONFIG_MIPS_N64_ABI || CONFIG_MIPS_N32_ABI)) || \
+ (TARGET_mips && !CONFIG_MIPS_N64_ABI) || \
TARGET_or1k || \
TARGET_powerpc || \
TARGET_riscv32 || \
--
2.46.0