From 3b1ee2b0be6ef6a78ae86482eb336f3ac2976fc8 Mon Sep 17 00:00:00 2001 From: lijianglin Date: Tue, 13 Jun 2023 11:12:22 +0800 Subject: [PATCH] display declaration fstat function, make fstat call the system fstat function the patch(commit 8ed005daf0ab03e142500324a34087ce179ae78) changed the implementation process of interface fstat and used a new system call newfstatat, which resulted in a decrease in the performance of fstat.this patch make fstat call the original system call to restore performance. --- sysdeps/unix/sysv/linux/fxstat64.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/fxstat64.c b/sysdeps/unix/sysv/linux/fxstat64.c index be127982..52775f7e 100644 --- a/sysdeps/unix/sysv/linux/fxstat64.c +++ b/sysdeps/unix/sysv/linux/fxstat64.c @@ -76,6 +76,10 @@ strong_alias (___fxstat64, __fxstat64) #if XSTAT_IS_XSTAT64 strong_alias (___fxstat64, __fxstat) +int fstat (int __fd, struct stat *__statbuf) +{ + return __fxstat (_STAT_VER, __fd, (struct stat64 *)__statbuf); +} #endif #endif /* LIB_COMPAT */ -- 2.33.0