diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c index c278a4dbce..e16c441b05 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c @@ -27,6 +27,7 @@ #if !XSTAT_IS_XSTAT64 #include "overflow.h" +#include <statx_cp.h> /* Get information about the file NAME in BUF. */ int @@ -34,8 +35,17 @@ __lxstat (int vers, const char *name, struct stat *buf) { if (vers == _STAT_VER_KERNEL) { +#ifdef __NR_fstatat64 int rc = INLINE_SYSCALL (fstatat64, 4, AT_FDCWD, name, buf, AT_SYMLINK_NOFOLLOW); +#else + struct statx tmp; + int rc = INLINE_SYSCALL (statx, 5, AT_FDCWD, name, + AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW, + STATX_BASIC_STATS, &tmp); + if (rc == 0) + __cp_stat64_statx ((struct stat64 *)buf, &tmp); +#endif return rc ?: stat_overflow (buf); } errno = EINVAL; |