aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-04-27 13:40:30 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-04-28 09:58:44 -0300
commit118a2aee07f64d605b6668cbe195c1f44eac6be6 (patch)
tree3c8cf185865a8797237217743d54e8f01d244d56 /sysdeps/unix/sysv
parent6f043e0ee7e477f50a44024ed0cb579d5e3f511d (diff)
downloadglibc-118a2aee07f64d605b6668cbe195c1f44eac6be6.zip
glibc-118a2aee07f64d605b6668cbe195c1f44eac6be6.tar.gz
glibc-118a2aee07f64d605b6668cbe195c1f44eac6be6.tar.bz2
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.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/fchmodat.c4
1 files changed, 2 insertions, 2 deletions
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;