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