076f82
commit 9db6a597ef950737d3cd7af0d4211291197b82dd
076f82
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
076f82
Date:   Tue May 31 12:17:20 2022 -0300
076f82
076f82
    posix: Use 64 bit stat for posix_fallocate fallback (BZ# 29207)
076f82
    
076f82
    This is a missing spot initially from 52a5fe70a2c77935.
076f82
    
076f82
    Checked on i686-linux-gnu.
076f82
    
076f82
    (cherry picked from commit 574ba60fc8a7fb35e6216e2fdecc521acab7ffd2)
076f82
076f82
diff --git a/sysdeps/posix/posix_fallocate.c b/sysdeps/posix/posix_fallocate.c
076f82
index 0bb379c94d7cf779..4381033d6e16c2e3 100644
076f82
--- a/sysdeps/posix/posix_fallocate.c
076f82
+++ b/sysdeps/posix/posix_fallocate.c
076f82
@@ -30,7 +30,7 @@
076f82
 int
076f82
 posix_fallocate (int fd, __off_t offset, __off_t len)
076f82
 {
076f82
-  struct stat64 st;
076f82
+  struct __stat64_t64 st;
076f82
 
076f82
   if (offset < 0 || len < 0)
076f82
     return EINVAL;
076f82
@@ -48,7 +48,7 @@ posix_fallocate (int fd, __off_t offset, __off_t len)
076f82
   }
076f82
 
076f82
   /* We have to make sure that this is really a regular file.  */
076f82
-  if (__fstat64 (fd, &st) != 0)
076f82
+  if (__fstat64_time64 (fd, &st) != 0)
076f82
     return EBADF;
076f82
   if (S_ISFIFO (st.st_mode))
076f82
     return ESPIPE;
076f82
diff --git a/sysdeps/posix/posix_fallocate64.c b/sysdeps/posix/posix_fallocate64.c
076f82
index c1e233b49c8d7f37..d45b0c17489fbbbb 100644
076f82
--- a/sysdeps/posix/posix_fallocate64.c
076f82
+++ b/sysdeps/posix/posix_fallocate64.c
076f82
@@ -30,7 +30,7 @@
076f82
 int
076f82
 __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
076f82
 {
076f82
-  struct stat64 st;
076f82
+  struct __stat64_t64 st;
076f82
 
076f82
   if (offset < 0 || len < 0)
076f82
     return EINVAL;
076f82
@@ -48,7 +48,7 @@ __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
076f82
   }
076f82
 
076f82
   /* We have to make sure that this is really a regular file.  */
076f82
-  if (__fstat64 (fd, &st) != 0)
076f82
+  if (__fstat64_time64 (fd, &st) != 0)
076f82
     return EBADF;
076f82
   if (S_ISFIFO (st.st_mode))
076f82
     return ESPIPE;