6ca6e8
commit 01c0a0405c5ea63d9b528e062b935d2ff6a6e2ed
6ca6e8
Author: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
6ca6e8
Date:   Wed Oct 26 16:04:24 2022 -0300
6ca6e8
6ca6e8
    nscd: Use 64 bit time_t on libc nscd routines (BZ# 29402)
6ca6e8
    
6ca6e8
    Although the nscd module is built with 64 bit time_t, the routines
6ca6e8
    linked direct to libc.so need to use the internal symbols.
6ca6e8
    Reviewed-by: DJ Delorie <dj@redhat.com>
6ca6e8
    
6ca6e8
    (cherry picked from commit fa4a19277842fd09a4815a986f70e0fe0903836f)
6ca6e8
6ca6e8
diff --git a/nscd/nscd.h b/nscd/nscd.h
6ca6e8
index b5da5be98a11d4de..1ce4c1f7fdb215f0 100644
6ca6e8
--- a/nscd/nscd.h
6ca6e8
+++ b/nscd/nscd.h
6ca6e8
@@ -66,7 +66,7 @@ typedef enum
6ca6e8
 struct traced_file
6ca6e8
 {
6ca6e8
   /* Tracks the last modified time of the traced file.  */
6ca6e8
-  time_t mtime;
6ca6e8
+  __time64_t mtime;
6ca6e8
   /* Support multiple registered files per database.  */
6ca6e8
   struct traced_file *next;
6ca6e8
   int call_res_init;
6ca6e8
diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c
6ca6e8
index 81bf324256384de7..b6baa8abf881461c 100644
6ca6e8
--- a/nscd/nscd_gethst_r.c
6ca6e8
+++ b/nscd/nscd_gethst_r.c
6ca6e8
@@ -113,7 +113,7 @@ __nscd_get_nl_timestamp (void)
6ca6e8
   if (map == NULL
6ca6e8
       || (map != NO_MAPPING
6ca6e8
 	  && map->head->nscd_certainly_running == 0
6ca6e8
-	  && map->head->timestamp + MAPPING_TIMEOUT < time_now ()))
6ca6e8
+	  && map->head->timestamp + MAPPING_TIMEOUT < time64_now ()))
6ca6e8
     map = __nscd_get_mapping (GETFDHST, "hosts", &__hst_map_handle.mapped);
6ca6e8
 
6ca6e8
   if (map == NO_MAPPING)