diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/stat64.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/stat64.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/stat64.c b/sysdeps/unix/sysv/linux/stat64.c index 2f40037c2c..bd8b17ac49 100644 --- a/sysdeps/unix/sysv/linux/stat64.c +++ b/sysdeps/unix/sysv/linux/stat64.c @@ -19,16 +19,30 @@ #define __stat __redirect___stat #define stat __redirect_stat #include <sys/stat.h> -#undef __stat -#undef stat #include <fcntl.h> #include <kernel_stat.h> +#include <stat_t64_cp.h> + +int +__stat64_time64 (const char *file, struct __stat64_t64 *buf) +{ + return __fstatat64_time64 (AT_FDCWD, file, buf, 0); +} +#if __TIMESIZE != 64 +hidden_def (__stat64_time64) int __stat64 (const char *file, struct stat64 *buf) { - return __fstatat64 (AT_FDCWD, file, buf, 0); + struct __stat64_t64 st_t64; + return __stat64_time64 (file, &st_t64) + ?: __cp_stat64_t64_stat64 (&st_t64, buf); } +#endif + +#undef __stat +#undef stat + hidden_def (__stat64) weak_alias (__stat64, stat64) |