about summary refs log tree commit diff
path: root/io/file_change_detection.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 /io/file_change_detection.c
parenta318262bc0081ab83e3f3c90e50462f99148605e (diff)
downloadglibc-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 'io/file_change_detection.c')
-rw-r--r--io/file_change_detection.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/io/file_change_detection.c b/io/file_change_detection.c
index 9871bc9166..fad0907223 100644
--- a/io/file_change_detection.c
+++ b/io/file_change_detection.c
@@ -44,7 +44,7 @@ libc_hidden_def (__file_is_unchanged)
 
 void
 __file_change_detection_for_stat (struct file_change_detection *file,
-                                  const struct stat64 *st)
+                                  const struct __stat64_t64 *st)
 {
   if (S_ISDIR (st->st_mode))
     /* Treat as empty file.  */
@@ -66,8 +66,8 @@ bool
 __file_change_detection_for_path (struct file_change_detection *file,
                                   const char *path)
 {
-  struct stat64 st;
-  if (__stat64 (path, &st) != 0)
+  struct __stat64_t64 st;
+  if (__stat64_time64 (path, &st) != 0)
     switch (errno)
       {
       case EACCES:
@@ -104,8 +104,8 @@ __file_change_detection_for_fp (struct file_change_detection *file,
     }
   else
     {
-      struct stat64 st;
-      if (__fstat64 (__fileno (fp), &st) != 0)
+      struct __stat64_t64 st;
+      if (__fstat64_time64 (__fileno (fp), &st) != 0)
         /* If we already have a file descriptor, all errors are fatal.  */
         return false;
       else