]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
posix: Use 64 bit stat for posix_fallocate fallback (BZ# 29207)
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 31 May 2022 15:17:20 +0000 (12:17 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 1 Jun 2022 16:23:16 +0000 (13:23 -0300)
This is a missing spot initially from 52a5fe70a2c77935.

Checked on i686-linux-gnu.

sysdeps/posix/posix_fallocate.c
sysdeps/posix/posix_fallocate64.c

index 037d328647ff7ebcf72e6d2a6df32f4400872034..9720e71cc66c07d5874dedbbb35059923046259f 100644 (file)
@@ -30,7 +30,7 @@
 int
 posix_fallocate (int fd, __off_t offset, __off_t len)
 {
-  struct stat64 st;
+  struct __stat64_t64 st;
 
   if (offset < 0 || len < 0)
     return EINVAL;
@@ -48,7 +48,7 @@ posix_fallocate (int fd, __off_t offset, __off_t len)
   }
 
   /* We have to make sure that this is really a regular file.  */
-  if (__fstat64 (fd, &st) != 0)
+  if (__fstat64_time64 (fd, &st) != 0)
     return EBADF;
   if (S_ISFIFO (st.st_mode))
     return ESPIPE;
index a670ee0a39e739e54ad42f083d1f381871881eab..bf984f7f91098a671d24324a5e34b23046db073b 100644 (file)
@@ -30,7 +30,7 @@
 int
 __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
 {
-  struct stat64 st;
+  struct __stat64_t64 st;
 
   if (offset < 0 || len < 0)
     return EINVAL;
@@ -48,7 +48,7 @@ __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
   }
 
   /* We have to make sure that this is really a regular file.  */
-  if (__fstat64 (fd, &st) != 0)
+  if (__fstat64_time64 (fd, &st) != 0)
     return EBADF;
   if (S_ISFIFO (st.st_mode))
     return ESPIPE;