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/loadlocale.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/loadlocale.c')
-rw-r--r-- | locale/loadlocale.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/locale/loadlocale.c b/locale/loadlocale.c index 9c03490883..f4e6cc9fc2 100644 --- a/locale/loadlocale.c +++ b/locale/loadlocale.c @@ -167,7 +167,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) { int fd; void *filedata; - struct stat64 st; + struct __stat64_t64 st; struct __locale_data *newdata; int save_err; int alloc = ld_mapped; @@ -180,7 +180,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) /* Cannot open the file. */ return; - if (__builtin_expect (__fstat64 (fd, &st), 0) < 0) + if (__glibc_unlikely (__fstat64_time64 (fd, &st) < 0)) { puntfd: __close_nocancel_nostatus (fd); @@ -206,7 +206,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) if (__builtin_expect (fd, 0) < 0) return; - if (__builtin_expect (__fstat64 (fd, &st), 0) < 0) + if (__glibc_unlikely (__fstat64_time64 (fd, &st) < 0)) goto puntfd; } |