diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-03-02 17:06:02 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-06-22 12:09:52 -0300 |
commit | 52a5fe70a2c77935afe807fb6e904e512ddd894e (patch) | |
tree | e17476a3ebc60b2e00aea93f24227199caaee8d4 /locale/loadarchive.c | |
parent | a318262bc0081ab83e3f3c90e50462f99148605e (diff) | |
download | glibc-52a5fe70a2c77935afe807fb6e904e512ddd894e.tar.gz glibc-52a5fe70a2c77935afe807fb6e904e512ddd894e.tar.xz glibc-52a5fe70a2c77935afe807fb6e904e512ddd894e.zip |
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 'locale/loadarchive.c')
-rw-r--r-- | locale/loadarchive.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/locale/loadarchive.c b/locale/loadarchive.c index 4177fc8972..512769eaec 100644 --- a/locale/loadarchive.c +++ b/locale/loadarchive.c @@ -78,7 +78,7 @@ static struct archmapped *archmapped; ARCHMAPPED points to this; if mapping the archive header failed, then headmap.ptr is null. */ static struct archmapped headmap; -static struct stat64 archive_stat; /* stat of archive when header mapped. */ +static struct __stat64_t64 archive_stat; /* stat of archive when header mapped. */ /* Record of locales that we have already loaded from the archive. */ struct locale_in_archive @@ -207,7 +207,7 @@ _nl_load_locale_from_archive (int category, const char **namep) /* Cannot open the archive, for whatever reason. */ return NULL; - if (__fstat64 (fd, &archive_stat) == -1) + if (__fstat64_time64 (fd, &archive_stat) == -1) { /* stat failed, very strange. */ close_and_out: @@ -396,7 +396,7 @@ _nl_load_locale_from_archive (int category, const char **namep) /* Open the file if it hasn't happened yet. */ if (fd == -1) { - struct stat64 st; + struct __stat64_t64 st; fd = __open_nocancel (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC); if (fd == -1) @@ -405,7 +405,7 @@ _nl_load_locale_from_archive (int category, const char **namep) /* Now verify we think this is really the same archive file we opened before. If it has been changed we cannot trust the header we read previously. */ - if (__fstat64 (fd, &st) < 0 + if (__fstat64_time64 (fd, &st) < 0 || st.st_size != archive_stat.st_size || st.st_mtime != archive_stat.st_mtime || st.st_dev != archive_stat.st_dev |