From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 3655D3858C53; Wed, 28 Dec 2022 20:27:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3655D3858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1672259235; bh=Zk+Q+C6S8FhNYiH9sLEkQT0lmUx2a6b8g3aJtVgthiQ=; h=From:To:Subject:Date:From; b=VoPBVpbpF28IWHsdkQWay9Hh2/QtNKHUZ3f0WZXqozxuIBT24hgrYv1Z021eLHJnh FLAnO+JG0eRADn4yF+oXu95Dci+hSnh00R3gwi1iloUEq+fg77c6o+mvdzB36HM/AZ TXHgINL+5kXQWQUiVcAWVK/IX4P8Fcui7qzjeeqU= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/release/2.34/master] nis: Build libnsl with 64 bit time_t X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella Netto X-Git-Refname: refs/heads/release/2.34/master X-Git-Oldrev: 42eb735a5d3458a24a44ace9eca87c8b61573d97 X-Git-Newrev: d910ba48f47158d21c322b9f7e96831c83f69c67 Message-Id: <20221228202715.3655D3858C53@sourceware.org> Date: Wed, 28 Dec 2022 20:27:15 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d910ba48f47158d21c322b9f7e96831c83f69c67 commit d910ba48f47158d21c322b9f7e96831c83f69c67 Author: Adhemerval Zanella Netto Date: Wed Oct 26 16:04:23 2022 -0300 nis: Build libnsl with 64 bit time_t And remove the usage of glibc reserved names. Reviewed-by: DJ Delorie (cherry picked from commit 545eefc2f5da61801ba82b7a32ca2589b769ec90) Diff: --- Makeconfig | 2 +- nis/nis_call.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makeconfig b/Makeconfig index 0a17cc82c8..6e6ec9c6d8 100644 --- a/Makeconfig +++ b/Makeconfig @@ -879,7 +879,7 @@ endif # Use 64 bit time_t support for installed programs installed-modules = nonlib nscd lddlibc4 libresolv ldconfig locale_programs \ iconvprogs libnss_files libnss_compat libnss_db libnss_hesiod \ - libutil libpcprofile libSegFault + libutil libpcprofile libSegFault libnsl +extra-time-flags = $(if $(filter $(installed-modules),\ $(in-module)),-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64) diff --git a/nis/nis_call.c b/nis/nis_call.c index 043f1bd431..37feba201c 100644 --- a/nis/nis_call.c +++ b/nis/nis_call.c @@ -575,7 +575,7 @@ static struct nis_server_cache unsigned int size; unsigned int server_used; unsigned int current_ep; - __time64_t expires; + time_t expires; char name[]; } *nis_server_cache[16]; static time_t nis_cold_start_mtime; @@ -584,7 +584,7 @@ __libc_lock_define_initialized (static, nis_server_cache_lock) static directory_obj * nis_server_cache_search (const_nis_name name, int search_parent, unsigned int *server_used, unsigned int *current_ep, - struct __timespec64 *now) + struct timespec *now) { directory_obj *ret = NULL; int i; @@ -642,7 +642,7 @@ nis_server_cache_search (const_nis_name name, int search_parent, static void nis_server_cache_add (const_nis_name name, int search_parent, directory_obj *dir, unsigned int server_used, - unsigned int current_ep, struct __timespec64 *now) + unsigned int current_ep, struct timespec *now) { struct nis_server_cache **loc; struct nis_server_cache *new; @@ -708,7 +708,7 @@ __nisfind_server (const_nis_name name, int search_parent, nis_error result = NIS_SUCCESS; nis_error status; directory_obj *obj; - struct __timespec64 ts; + struct timespec ts; unsigned int server_used = ~0; unsigned int current_ep = ~0; @@ -718,7 +718,7 @@ __nisfind_server (const_nis_name name, int search_parent, if (*dir != NULL) return NIS_SUCCESS; - __clock_gettime64 (CLOCK_REALTIME, &ts); + clock_gettime (CLOCK_REALTIME, &ts); if ((flags & NO_CACHE) == 0) *dir = nis_server_cache_search (name, search_parent, &server_used,