]> sourceware.org Git - glibc.git/blobdiff - io/file_change_detection.c
support: Use macros for *stat wrappers
[glibc.git] / io / file_change_detection.c
index fad0907223ece8e8a5ee83def8bac1604cd681d5..30c6828a52789fffe730d1d703cc6f25f0c623c0 100644 (file)
@@ -1,5 +1,5 @@
 /* Detecting file changes using modification times.
-   Copyright (C) 2017-2021 Free Software Foundation, Inc.
+   Copyright (C) 2017-2024 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -56,8 +56,10 @@ __file_change_detection_for_stat (struct file_change_detection *file,
     {
       file->size = st->st_size;
       file->ino = st->st_ino;
-      file->mtime = st->st_mtim;
-      file->ctime = st->st_ctim;
+      file->mtime = (struct __timespec64) { st->st_mtim.tv_sec,
+                                           st->st_mtim.tv_nsec };
+      file->ctime = (struct __timespec64) { st->st_ctim.tv_sec,
+                                           st->st_ctim.tv_nsec };
     }
 }
 libc_hidden_def (__file_change_detection_for_stat)
@@ -84,7 +86,7 @@ __file_change_detection_for_path (struct file_change_detection *file,
         /* Other errors are fatal.  */
         return false;
       }
-  else /* stat64 was successfull.  */
+  else /* stat64 was successful.  */
     {
       __file_change_detection_for_stat (file, &st);
       return true;
This page took 0.028817 seconds and 5 git commands to generate.