forked from rpms/glibc
ad85e10075
Upstream commit: commit 6484ae5b8c4d4314f748e4d3c9a9baa5385e57c5 - malloc: Fix -Wuse-after-free warning in tst-mallocalign1 [BZ #26779] - s_sincosf.h: Change pio4 type to float [BZ #28713] - math: Properly cast X_TLOSS to float [BZ #28713] - Regenerate ulps on x86_64 with GCC 12 - Avoid -Wuse-after-free in tests [BZ #26779]. - Fix build of nptl/tst-thread_local1.cc with GCC 12 - Fix stdio-common tests for GCC 12 -Waddress - Fix stdlib/tst-setcontext.c for GCC 12 -Warray-compare - resolv: Avoid GCC 12 false positive warning [BZ #28439]. - intl: Avoid -Wuse-after-free [BZ #26779] - elf: Drop elf/tls-macros.h in favor of __thread and tls_model attributes [BZ #28152] [BZ #28205] - time: Set daylight to 1 for matching DST/offset change (RHBZ#2155352) - elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 (BZ# 29776) - time: Use 64 bit time on tzfile - nscd: Use 64 bit time_t on libc nscd routines (BZ# 29402) - nis: Build libnsl with 64 bit time_t - Use LFS and 64 bit time for installed programs (BZ #15333) Resolves: #2155352 Related: #2160734
74 lines
2.6 KiB
Diff
74 lines
2.6 KiB
Diff
commit d910ba48f47158d21c322b9f7e96831c83f69c67
|
|
Author: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
|
|
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 <dj@redhat.com>
|
|
|
|
(cherry picked from commit 545eefc2f5da61801ba82b7a32ca2589b769ec90)
|
|
|
|
diff --git a/Makeconfig b/Makeconfig
|
|
index 9accb5b38d1d37b3..89a2881b1ef605e4 100644
|
|
--- a/Makeconfig
|
|
+++ b/Makeconfig
|
|
@@ -885,7 +885,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 043f1bd4316aa284..37feba201c37cbca 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,
|