summaryrefslogtreecommitdiff
path: root/libio/fileops.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-03-02 17:06:02 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-22 12:09:52 -0300
commit52a5fe70a2c77935afe807fb6e904e512ddd894e (patch)
treee17476a3ebc60b2e00aea93f24227199caaee8d4 /libio/fileops.c
parenta318262bc0081ab83e3f3c90e50462f99148605e (diff)
downloadglibc-52a5fe70a2c77935afe807fb6e904e512ddd894e.tar.gz
Use 64 bit time_t stat internally
For the legacy ABI with supports 32-bit time_t it calls the 64-bit time directly, since the LFS symbols calls the 64-bit time_t ones internally. Checked on i686-linux-gnu and x86_64-linux-gnu. Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'libio/fileops.c')
-rw-r--r--libio/fileops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libio/fileops.c b/libio/fileops.c
index a71a567547..e8ee374821 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -545,7 +545,7 @@ libc_hidden_ver (_IO_new_file_underflow, _IO_file_underflow)
static int
mmap_remap_check (FILE *fp)
{
- struct stat64 st;
+ struct __stat64_t64 st;
if (_IO_SYSSTAT (fp, &st) == 0
&& S_ISREG (st.st_mode) && st.st_size != 0
@@ -663,7 +663,7 @@ decide_maybe_mmap (FILE *fp)
file descriptors are for mmap-able objects and on 32-bit
machines we don't want to map files which are too large since
this would require too much virtual memory. */
- struct stat64 st;
+ struct __stat64_t64 st;
if (_IO_SYSSTAT (fp, &st) == 0
&& S_ISREG (st.st_mode) && st.st_size != 0
@@ -962,7 +962,7 @@ _IO_new_file_seekoff (FILE *fp, off64_t offset, int dir, int mode)
break;
case _IO_seek_end:
{
- struct stat64 st;
+ struct __stat64_t64 st;
if (_IO_SYSSTAT (fp, &st) == 0 && S_ISREG (st.st_mode))
{
offset += st.st_size;
@@ -1145,7 +1145,7 @@ libc_hidden_def (_IO_file_seek)
int
_IO_file_stat (FILE *fp, void *st)
{
- return __fstat64 (fp->_fileno, (struct stat64 *) st);
+ return __fstat64_time64 (fp->_fileno, (struct __stat64_t64 *) st);
}
libc_hidden_def (_IO_file_stat)