From 118a2aee07f64d605b6668cbe195c1f44eac6be6 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 27 Apr 2022 13:40:30 -0300 Subject: linux: Fix fchmodat with AT_SYMLINK_NOFOLLOW for 64 bit time_t (BZ#29097) The AT_SYMLINK_NOFOLLOW emulation ues the default 32 bit stat internal calls, which fails with EOVERFLOW if the file constains timestamps beyond 2038. Checked on i686-linux-gnu. --- sysdeps/unix/sysv/linux/fchmodat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysdeps/unix/sysv') diff --git a/sysdeps/unix/sysv/linux/fchmodat.c b/sysdeps/unix/sysv/linux/fchmodat.c index 7aa073b..7aae021 100644 --- a/sysdeps/unix/sysv/linux/fchmodat.c +++ b/sysdeps/unix/sysv/linux/fchmodat.c @@ -48,8 +48,8 @@ fchmodat (int fd, const char *file, mode_t mode, int flag) /* Use fstatat because fstat does not work on O_PATH descriptors before Linux 3.6. */ - struct stat64 st; - if (__fstatat64 (pathfd, "", &st, AT_EMPTY_PATH) != 0) + struct __stat64_t64 st; + if (__fstatat64_time64 (pathfd, "", &st, AT_EMPTY_PATH) != 0) { __close_nocancel (pathfd); return -1; -- cgit v1.1