]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
nscd: Use 64 bit time_t on libc nscd routines (BZ# 29402)
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Wed, 26 Oct 2022 19:04:24 +0000 (16:04 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 28 Dec 2022 20:25:18 +0000 (17:25 -0300)
Although the nscd module is built with 64 bit time_t, the routines
linked direct to libc.so need to use the internal symbols.
Reviewed-by: DJ Delorie <dj@redhat.com>
(cherry picked from commit fa4a19277842fd09a4815a986f70e0fe0903836f)

NEWS
nscd/nscd.h
nscd/nscd_gethst_r.c

diff --git a/NEWS b/NEWS
index 2765efc5a251961b3f4072d55a5aa116372aa003..a70622df1d97a71cdbd8c2628abc2e1c2cd792fe 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -125,6 +125,7 @@ The following bugs are resolved with this release:
   [29213] libc: gconv_parseconfdir is not y2038 aware
   [29214] nptl: pthread_setcanceltype fails to set type
   [29305] Conserve NSS buffer space during DNS packet parsing
+  [29402] nscd: nscd: No such file or directory
   [29415] nscd: Fix netlink cache invalidation if epoll is used
   [29446] _dlopen now ignores dl_caller argument in static mode
   [29490] alpha: New __brk_call implementation is broken
index b5da5be98a11d4de13e1b5ea0619054c2a5239b6..1ce4c1f7fdb215f0193c350786f1a3ed8d292ea2 100644 (file)
@@ -66,7 +66,7 @@ typedef enum
 struct traced_file
 {
   /* Tracks the last modified time of the traced file.  */
-  time_t mtime;
+  __time64_t mtime;
   /* Support multiple registered files per database.  */
   struct traced_file *next;
   int call_res_init;
index 81bf324256384de7b6677f8db4bd0987c0fc4e4e..b6baa8abf881461c79d0f6f9c366b83a4d354677 100644 (file)
@@ -113,7 +113,7 @@ __nscd_get_nl_timestamp (void)
   if (map == NULL
       || (map != NO_MAPPING
          && map->head->nscd_certainly_running == 0
-         && map->head->timestamp + MAPPING_TIMEOUT < time_now ()))
+         && map->head->timestamp + MAPPING_TIMEOUT < time64_now ()))
     map = __nscd_get_mapping (GETFDHST, "hosts", &__hst_map_handle.mapped);
 
   if (map == NO_MAPPING)