summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2020-03-04 15:36:01 +0100
committerArnd Bergmann <arnd@arndb.de>2020-03-12 16:34:57 +0100
commit4e149fe9902159e6d67b83d802ea177b0d437158 (patch)
treedad2fcfd2392975757ac70f6d36a9d25389f1073
parentff7835f3b66f9e5fe41e1ec160b994ba4bcb27e5 (diff)
Discarded patches
I tried a few things, but disabled them again afterwards Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/try-to-avoid-time322369
-rw-r--r--debian/patches/y2038-force.diff517
4 files changed, 2890 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index b6c36308..67178484 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,8 @@
-glibc (2.31-2038.1) UNRELEASED; urgency=medium
+glibc (2.31-2038.2) UNRELEASED; urgency=medium
[ Arnd Bergmann ]
* Import https://github.com/lmajewski/y2038_glibc/commits/y2038_edge
+ * Force-enable time64
-- Arnd Bergmann <arnd@arndb.de> Tue, 03 Mar 2020 10:00:09 +0100
diff --git a/debian/patches/series b/debian/patches/series
index e93c56a1..56400cda 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -121,3 +121,5 @@ any/local-cudacc-float128.diff
any/submitted-ld.so-cache-new-format.diff
any/local-test-install.diff
any/submitted-stt-gnu-ifunc-detection.patch
+#y2038-force.diff
+#try-to-avoid-time32
diff --git a/debian/patches/try-to-avoid-time32 b/debian/patches/try-to-avoid-time32
new file mode 100644
index 00000000..7b3c8ff2
--- /dev/null
+++ b/debian/patches/try-to-avoid-time32
@@ -0,0 +1,2369 @@
+Description: <short summary of the patch>
+ TODO: Put a short summary on the line above and replace this paragraph
+ with a longer explanation of this change. Complete the meta-information
+ with other relevant fields (see below for details). To make it easier, the
+ information below has been extracted from the changelog. Adjust it or drop
+ it.
+ .
+ glibc (2.31-2038.2broken) UNRELEASED; urgency=medium
+ .
+ [ Arnd Bergmann ]
+ * Import https://github.com/lmajewski/y2038_glibc/commits/y2038_edge
+ * Force-enable time64
+ *
+Author: Arnd Bergmann <arnd@arndb.de>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: 2020-03-05
+
+--- glibc-2.31.orig/debug/ppoll_chk.c
++++ glibc-2.31/debug/ppoll_chk.c
+@@ -19,11 +19,11 @@
+
+
+ int
+-__ppoll_chk (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
++__ppoll_chk (struct pollfd *fds, nfds_t nfds, const struct __timespec64 *timeout,
+ const __sigset_t *ss, __SIZE_TYPE__ fdslen)
+ {
+ if (fdslen / sizeof (*fds) < nfds)
+ __chk_fail ();
+
+- return ppoll (fds, nfds, timeout, ss);
++ return __ppoll64 (fds, nfds, timeout, ss);
+ }
+--- glibc-2.31.orig/fbtl/pthreadP.h
++++ glibc-2.31/fbtl/pthreadP.h
+@@ -476,7 +476,7 @@ extern int __pthread_cond_signal (pthrea
+ extern int __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex);
+ extern int __pthread_cond_timedwait (pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+- const struct timespec *abstime);
++ const struct __timespec64 *abstime);
+ extern int __pthread_condattr_destroy (pthread_condattr_t *attr);
+ extern int __pthread_condattr_init (pthread_condattr_t *attr);
+ extern int __pthread_key_create (pthread_key_t *key, void (*destr) (void *));
+@@ -517,7 +517,7 @@ extern int __pthread_cond_init_2_0 (pthr
+ extern int __pthread_cond_signal_2_0 (pthread_cond_2_0_t *cond);
+ extern int __pthread_cond_timedwait_2_0 (pthread_cond_2_0_t *cond,
+ pthread_mutex_t *mutex,
+- const struct timespec *abstime);
++ const struct __timespec64 *abstime);
+ extern int __pthread_cond_wait_2_0 (pthread_cond_2_0_t *cond,
+ pthread_mutex_t *mutex);
+
+--- glibc-2.31.orig/include/features.h
++++ glibc-2.31/include/features.h
+@@ -382,7 +382,7 @@
+ /* force _FILE_OFFSET_BITS and _TIME_BITS */
+ #if __WORDSIZE == 32
+ #if !defined _TIME_BITS || _TIME_BITS != 64
+-#if !IS_IN(libc) && !IS_IN(rtld) && !IS_IN(libmemusage)
++#if !IS_IN(libc) && !IS_IN(rtld) && !IS_IN(libmemusage) && !IS_IN(libpthread)
+ #define _FILE_OFFSET_BITS 64
+ #endif
+ #if !IS_IN(libc) && !IS_IN(rtld)
+--- glibc-2.31.orig/include/random-bits.h
++++ glibc-2.31/include/random-bits.h
+@@ -30,8 +30,8 @@
+ static inline uint32_t
+ random_bits (void)
+ {
+- struct timespec tv;
+- __clock_gettime (CLOCK_MONOTONIC, &tv);
++ struct __timespec64 tv;
++ __clock_gettime64 (CLOCK_MONOTONIC, &tv);
+ /* Shuffle the lower bits to minimize the clock bias. */
+ uint32_t ret = tv.tv_nsec ^ tv.tv_sec;
+ ret ^= (ret << 24) | (ret >> 8);
+--- glibc-2.31.orig/include/rpc/clnt.h
++++ glibc-2.31/include/rpc/clnt.h
+@@ -8,7 +8,7 @@ extern int _openchild (const char *comma
+
+ extern CLIENT *__libc_clntudp_bufcreate (struct sockaddr_in *__raddr,
+ u_long __program, u_long __version,
+- struct timeval __wait_resend,
++ struct __timeval64 __wait_resend,
+ int *__sockp, u_int __sendsz,
+ u_int __recvsz, int __flags);
+
+--- glibc-2.31.orig/include/sys/wait.h
++++ glibc-2.31/include/sys/wait.h
+@@ -8,12 +8,13 @@ extern __pid_t __waitpid (__pid_t __pid,
+ libc_hidden_proto (__waitpid)
+ extern int __waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options);
+
++struct __rusage64;
+ extern __pid_t __libc_wait (int *__stat_loc);
+ extern __pid_t __wait (int *__stat_loc);
+ extern __pid_t __wait3 (int *__stat_loc,
+- int __options, struct rusage * __usage);
++ int __options, struct __rusage64 * __usage);
+ extern __pid_t __wait4 (__pid_t __pid, int *__stat_loc,
+- int __options, struct rusage *__usage)
++ int __options, struct __rusage64 *__usage)
+ attribute_hidden;
+ libc_hidden_proto (__wait4);
+ #endif
+--- glibc-2.31.orig/include/time.h
++++ glibc-2.31/include/time.h
+@@ -302,8 +302,8 @@ extern void __tzset (void) attribute_hid
+ extern struct tm *__tz_convert (__time64_t timer, int use_localtime,
+ struct tm *tp) attribute_hidden;
+
+-extern int __nanosleep (const struct timespec *__requested_time,
+- struct timespec *__remaining);
++extern int __nanosleep (const struct __timespec64 *__requested_time,
++ struct __timespec64 *__remaining);
+ hidden_proto (__nanosleep)
+ extern int __getdate_r (const char *__string, struct tm *__resbufp)
+ attribute_hidden;
+@@ -513,8 +513,8 @@ valid_nanoseconds (__syscall_slong_t ns)
+ static inline time_t
+ time_now (void)
+ {
+- struct timespec ts;
+- __clock_gettime (TIME_CLOCK_GETTIME_CLOCKID, &ts);
++ struct __timespec64 ts;
++ __clock_gettime64 (TIME_CLOCK_GETTIME_CLOCKID, &ts);
+ return ts.tv_sec;
+ }
+ #endif
+--- glibc-2.31.orig/inet/deadline.c
++++ glibc-2.31/inet/deadline.c
+@@ -28,8 +28,8 @@ struct deadline_current_time
+ __deadline_current_time (void)
+ {
+ struct deadline_current_time result;
+- if (__clock_gettime (CLOCK_MONOTONIC, &result.current) != 0)
+- __clock_gettime (CLOCK_REALTIME, &result.current);
++ if (__clock_gettime64 (CLOCK_MONOTONIC, &result.current) != 0)
++ __clock_gettime64 (CLOCK_REALTIME, &result.current);
+ assert (result.current.tv_sec >= 0);
+ return result;
+ }
+@@ -44,7 +44,7 @@ infinite_deadline (void)
+
+ struct deadline
+ __deadline_from_timeval (struct deadline_current_time current,
+- struct timeval tv)
++ struct __timeval64 tv)
+ {
+ assert (__is_timeval_valid_timeout (tv));
+
+--- glibc-2.31.orig/inet/net-internal.h
++++ glibc-2.31/inet/net-internal.h
+@@ -22,6 +22,7 @@
+ #include <arpa/inet.h>
+ #include <stdbool.h>
+ #include <stdint.h>
++#include <time.h>
+ #include <sys/time.h>
+ #include <libc-diag.h>
+
+@@ -76,7 +77,7 @@ enum idna_name_classification __idna_nam
+ timeouts and vice versa. */
+ struct deadline_current_time
+ {
+- struct timespec current;
++ struct __timespec64 current;
+ };
+
+ /* Return the current time. Terminates the process if the current
+@@ -86,7 +87,7 @@ struct deadline_current_time __deadline_
+ /* Computed absolute deadline. */
+ struct deadline
+ {
+- struct timespec absolute;
++ struct __timespec64 absolute;
+ };
+
+
+@@ -136,7 +137,7 @@ DIAG_POP_NEEDS_COMMENT;
+ /* Add TV to the current time and return it. Returns a special
+ infinite absolute deadline on overflow. */
+ struct deadline __deadline_from_timeval (struct deadline_current_time,
+- struct timeval tv) attribute_hidden;
++ struct __timeval64 tv) attribute_hidden;
+
+ /* Compute the number of milliseconds until the specified deadline,
+ from the current time in the argument. The result is mainly for
+@@ -148,7 +149,7 @@ int __deadline_to_ms (struct deadline_cu
+ /* Return true if TV.tv_sec is non-negative and TV.tv_usec is in the
+ interval [0, 999999]. */
+ static inline bool
+-__is_timeval_valid_timeout (struct timeval tv)
++__is_timeval_valid_timeout (struct __timeval64 tv)
+ {
+ return tv.tv_sec >= 0 && tv.tv_usec >= 0 && tv.tv_usec < 1000 * 1000;
+ }
+--- glibc-2.31.orig/io/bits/poll2.h
++++ glibc-2.31/io/bits/poll2.h
+@@ -20,6 +20,7 @@
+ # error "Never include <bits/poll2.h> directly; use <sys/poll.h> instead."
+ #endif
+
++#include <time.h>
+
+ __BEGIN_DECLS
+
+@@ -49,20 +50,20 @@ poll (struct pollfd *__fds, nfds_t __nfd
+
+ #ifdef __USE_GNU
+ extern int __REDIRECT (__ppoll_alias, (struct pollfd *__fds, nfds_t __nfds,
+- const struct timespec *__timeout,
++ const struct __timespec64 *__timeout,
+ const __sigset_t *__ss), ppoll);
+ extern int __ppoll_chk (struct pollfd *__fds, nfds_t __nfds,
+- const struct timespec *__timeout,
++ const struct __timespec64 *__timeout,
+ const __sigset_t *__ss, __SIZE_TYPE__ __fdslen);
+ extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
+- const struct timespec *__timeout,
++ const struct __timespec64 *__timeout,
+ const __sigset_t *__ss,
+ __SIZE_TYPE__ __fdslen),
+ __ppoll_chk)
+ __warnattr ("ppoll called with fds buffer too small file nfds entries");
+
+ __fortify_function int
+-ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
++ppoll (struct pollfd *__fds, nfds_t __nfds, const struct __timespec64 *__timeout,
+ const __sigset_t *__ss)
+ {
+ if (__bos (__fds) != (__SIZE_TYPE__) -1)
+--- glibc-2.31.orig/locale/programs/locarchive.c
++++ glibc-2.31/locale/programs/locarchive.c
+@@ -619,12 +619,12 @@ open_archive (struct locarhandle *ah, bo
+
+ if (retry++ < max_locarchive_open_retry)
+ {
+- struct timespec req;
++ struct __timespec64 req;
+
+ /* Wait for a bit. */
+ req.tv_sec = 0;
+ req.tv_nsec = 1000000 * (random () % 500 + 1);
+- (void) nanosleep (&req, NULL);
++ (void) __nanosleep (&req, NULL);
+
+ continue;
+ }
+--- glibc-2.31.orig/malloc/memusage.c
++++ glibc-2.31/malloc/memusage.c
+@@ -295,12 +295,12 @@ me (void)
+
+ if (sigaction (SIGPROF, &act, NULL) >= 0)
+ {
+- struct itimerval timer;
++ struct __itimerval64 timer;
+
+ timer.it_value.tv_sec = 0;
+ timer.it_value.tv_usec = 1;
+ timer.it_interval = timer.it_value;
+- setitimer (ITIMER_PROF, &timer, NULL);
++ __setitimer64 (ITIMER_PROF, &timer, NULL);
+ }
+ }
+ }
+--- glibc-2.31.orig/misc/syslog.c
++++ glibc-2.31/misc/syslog.c
+@@ -148,7 +148,7 @@ __vsyslog_internal(int pri, const char *
+ unsigned int mode_flags)
+ {
+ struct tm now_tm;
+- time_t now;
++ __time64_t now;
+ int fd;
+ FILE *f;
+ char *buf = 0;
+@@ -210,7 +210,7 @@ __vsyslog_internal(int pri, const char *
+ f->_IO_write_end
+ - f->_IO_write_ptr,
+ "%h %e %T ",
+- __localtime_r (&now, &now_tm),
++ __localtime64_r (&now, &now_tm),
+ _nl_C_locobj_ptr);
+ msgoff = ftell (f);
+ if (LogTag == NULL)
+--- glibc-2.31.orig/nis/nis_findserv.c
++++ glibc-2.31/nis/nis_findserv.c
+@@ -71,7 +71,7 @@ struct findserv_req
+
+ static long int
+ __nis_findfastest_with_timeout (dir_binding *bind,
+- const struct timeval *timeout)
++ const struct __timeval64 *timeout)
+ {
+ static const struct timeval TIMEOUT00 = { 0, 0 };
+ struct findserv_req *pings;
+@@ -202,7 +202,7 @@ __nis_findfastest_with_timeout (dir_bind
+ long int
+ __nis_findfastest (dir_binding *bind)
+ {
+- struct timeval timeout = { __NIS_PING_TIMEOUT_START, 0 };
++ struct __timeval64 timeout = { __NIS_PING_TIMEOUT_START, 0 };
+ long int found = -1;
+ long int retry = __NIS_PING_RETRY + 1;
+
+--- glibc-2.31.orig/nptl/eintr.c
++++ glibc-2.31/nptl/eintr.c
+@@ -42,7 +42,7 @@ eintr_handler (int sig)
+ static void *
+ eintr_source (void *arg)
+ {
+- struct timespec ts = { .tv_sec = 0, .tv_nsec = 500000 };
++ struct __timespec64 ts = { .tv_sec = 0, .tv_nsec = 500000 };
+
+ if (arg == NULL)
+ {
+@@ -59,7 +59,7 @@ eintr_source (void *arg)
+ else
+ kill (getpid (), the_sig);
+
+- nanosleep (&ts, NULL);
++ __nanosleep64 (&ts, NULL);
+ }
+
+ /* NOTREACHED */
+--- glibc-2.31.orig/nptl/forward.c
++++ glibc-2.31/nptl/forward.c
+@@ -91,14 +91,14 @@ versioned_symbol (libc, __pthread_cond_w
+ #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2)
+ FORWARD2 (__pthread_cond_timedwait_2_0, int attribute_compat_text_section,
+ (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex,
+- const struct timespec *abstime), (cond, mutex, abstime),
++ const struct __timespec64 *abstime), (cond, mutex, abstime),
+ return 0)
+ compat_symbol (libc, __pthread_cond_timedwait_2_0, pthread_cond_timedwait,
+ GLIBC_2_0);
+ #endif
+ FORWARD (__pthread_cond_timedwait,
+ (pthread_cond_t *cond, pthread_mutex_t *mutex,
+- const struct timespec *abstime), (cond, mutex, abstime), 0)
++ const struct __timespec64 *abstime), (cond, mutex, abstime), 0)
+ versioned_symbol (libc, __pthread_cond_timedwait, pthread_cond_timedwait,
+ GLIBC_2_3_2);
+
+--- glibc-2.31.orig/nptl/lll_timedlock_wait.c
++++ glibc-2.31/nptl/lll_timedlock_wait.c
+@@ -26,9 +26,9 @@
+
+ int
+ __lll_clocklock_wait (int *futex, int val, clockid_t clockid,
+- const struct timespec *abstime, int private)
++ const struct __timespec64 *abstime, int private)
+ {
+- struct timespec ts, *tsp = NULL;
++ struct __timespec64 ts, *tsp = NULL;
+
+ if (abstime != NULL)
+ {
+@@ -37,7 +37,7 @@ __lll_clocklock_wait (int *futex, int va
+ return EINVAL;
+
+ /* Get the current time. This can only fail if clockid is not valid. */
+- if (__glibc_unlikely (__clock_gettime (clockid, &ts) != 0))
++ if (__glibc_unlikely (__clock_gettime64 (clockid, &ts) != 0))
+ return EINVAL;
+
+ /* Compute relative timeout. */
+--- glibc-2.31.orig/nptl/old_pthread_cond_timedwait.c
++++ glibc-2.31/nptl/old_pthread_cond_timedwait.c
+@@ -26,7 +26,7 @@
+ #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2)
+ int
+ __pthread_cond_timedwait_2_0 (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ if (cond->cond == NULL)
+ {
+--- glibc-2.31.orig/nptl/pthreadP.h
++++ glibc-2.31/nptl/pthreadP.h
+@@ -391,7 +391,7 @@ extern int __pthread_mutex_destroy (pthr
+ extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex);
+ extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
+ extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex,
+- const struct timespec *__abstime);
++ const struct __timespec64 *__abstime);
+ extern int __pthread_mutex_cond_lock (pthread_mutex_t *__mutex)
+ attribute_hidden;
+ extern void __pthread_mutex_cond_lock_adjust (pthread_mutex_t *__mutex)
+@@ -452,11 +452,11 @@ extern int __pthread_cond_signal (pthrea
+ extern int __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex);
+ extern int __pthread_cond_timedwait (pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+- const struct timespec *abstime);
++ const struct __timespec64 *abstime);
+ extern int __pthread_cond_clockwait (pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ clockid_t clockid,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ __nonnull ((1, 2, 4));
+ extern int __pthread_condattr_destroy (pthread_condattr_t *attr);
+ extern int __pthread_condattr_init (pthread_condattr_t *attr);
+@@ -480,7 +480,7 @@ extern int __pthread_enable_asynccancel
+ extern void __pthread_disable_asynccancel (int oldtype) attribute_hidden;
+ extern void __pthread_testcancel (void);
+ extern int __pthread_clockjoin_ex (pthread_t, void **, clockid_t,
+- const struct timespec *, bool)
++ const struct __timespec64 *, bool)
+ attribute_hidden;
+
+
+@@ -510,7 +510,7 @@ extern int __pthread_cond_init_2_0 (pthr
+ extern int __pthread_cond_signal_2_0 (pthread_cond_2_0_t *cond);
+ extern int __pthread_cond_timedwait_2_0 (pthread_cond_2_0_t *cond,
+ pthread_mutex_t *mutex,
+- const struct timespec *abstime);
++ const struct __timespec64 *abstime);
+ extern int __pthread_cond_wait_2_0 (pthread_cond_2_0_t *cond,
+ pthread_mutex_t *mutex);
+
+--- glibc-2.31.orig/nptl/pthread_clockjoin.c
++++ glibc-2.31/nptl/pthread_clockjoin.c
+@@ -21,7 +21,7 @@
+ int
+ __pthread_clockjoin_np (pthread_t threadid, void **thread_return,
+ clockid_t clockid,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ return __pthread_clockjoin_ex (threadid, thread_return,
+ clockid, abstime, true);
+--- glibc-2.31.orig/nptl/pthread_cond_wait.c
++++ glibc-2.31/nptl/pthread_cond_wait.c
+@@ -379,7 +379,7 @@ __condvar_cleanup_waiting (void *arg)
+ static __always_inline int
+ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex,
+ clockid_t clockid,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ const int maxspin = 0;
+ int err;
+@@ -641,7 +641,7 @@ __pthread_cond_wait (pthread_cond_t *con
+ /* See __pthread_cond_wait_common. */
+ int
+ __pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ /* Check parameter validity. This should also tell the compiler that
+ it can assume that abstime is not NULL. */
+@@ -664,7 +664,7 @@ versioned_symbol (libpthread, __pthread_
+ int
+ __pthread_cond_clockwait (pthread_cond_t *cond, pthread_mutex_t *mutex,
+ clockid_t clockid,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ /* Check parameter validity. This should also tell the compiler that
+ it can assume that abstime is not NULL. */
+--- glibc-2.31.orig/nptl/pthread_join_common.c
++++ glibc-2.31/nptl/pthread_join_common.c
+@@ -37,7 +37,7 @@ cleanup (void *arg)
+ afterwards. The kernel up to version 3.16.3 does not use the private futex
+ operations for futex wake-up when the clone terminates. */
+ static int
+-clockwait_tid (pid_t *tidp, clockid_t clockid, const struct timespec *abstime)
++clockwait_tid (pid_t *tidp, clockid_t clockid, const struct __timespec64 *abstime)
+ {
+ pid_t tid;
+
+@@ -47,11 +47,11 @@ clockwait_tid (pid_t *tidp, clockid_t cl
+ /* Repeat until thread terminated. */
+ while ((tid = *tidp) != 0)
+ {
+- struct timespec rt;
++ struct __timespec64 rt;
+
+ /* Get the current time. This can only fail if clockid is
+ invalid. */
+- if (__glibc_unlikely (__clock_gettime (clockid, &rt)))
++ if (__glibc_unlikely (__clock_gettime64 (clockid, &rt)))
+ return EINVAL;
+
+ /* Compute relative timeout. */
+@@ -81,7 +81,7 @@ clockwait_tid (pid_t *tidp, clockid_t cl
+ int
+ __pthread_clockjoin_ex (pthread_t threadid, void **thread_return,
+ clockid_t clockid,
+- const struct timespec *abstime, bool block)
++ const struct __timespec64 *abstime, bool block)
+ {
+ struct pthread *pd = (struct pthread *) threadid;
+
+--- glibc-2.31.orig/nptl/pthread_mutex_timedlock.c
++++ glibc-2.31/nptl/pthread_mutex_timedlock.c
+@@ -45,7 +45,7 @@
+ int
+ __pthread_mutex_clocklock_common (pthread_mutex_t *mutex,
+ clockid_t clockid,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ int oldval;
+ pid_t id = THREAD_GETMEM (THREAD_SELF, tid);
+@@ -543,10 +543,10 @@ __pthread_mutex_clocklock_common (pthrea
+ goto failpp;
+ }
+
+- struct timespec rt;
++ struct __timespec64 rt;
+
+ /* Get the current time. */
+- __clock_gettime (CLOCK_REALTIME, &rt);
++ __clock_gettime64 (CLOCK_REALTIME, &rt);
+
+ /* Compute relative timeout. */
+ rt.tv_sec = abstime->tv_sec - rt.tv_sec;
+@@ -601,7 +601,7 @@ __pthread_mutex_clocklock_common (pthrea
+ int
+ __pthread_mutex_clocklock (pthread_mutex_t *mutex,
+ clockid_t clockid,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ if (__glibc_unlikely (!lll_futex_supported_clockid (clockid)))
+ return EINVAL;
+@@ -613,7 +613,7 @@ weak_alias (__pthread_mutex_clocklock, p
+
+ int
+ __pthread_mutex_timedlock (pthread_mutex_t *mutex,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ LIBC_PROBE (mutex_timedlock_entry, 2, mutex, abstime);
+ return __pthread_mutex_clocklock_common (mutex, CLOCK_REALTIME, abstime);
+--- glibc-2.31.orig/nptl/pthread_rwlock_clockrdlock.c
++++ glibc-2.31/nptl/pthread_rwlock_clockrdlock.c
+@@ -22,7 +22,7 @@
+ /* See pthread_rwlock_common.c. */
+ int
+ pthread_rwlock_clockrdlock (pthread_rwlock_t *rwlock, clockid_t clockid,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ return __pthread_rwlock_rdlock_full (rwlock, clockid, abstime);
+ }
+--- glibc-2.31.orig/nptl/pthread_rwlock_clockwrlock.c
++++ glibc-2.31/nptl/pthread_rwlock_clockwrlock.c
+@@ -22,7 +22,7 @@
+ /* See pthread_rwlock_common.c. */
+ int
+ pthread_rwlock_clockwrlock (pthread_rwlock_t *rwlock, clockid_t clockid,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ return __pthread_rwlock_wrlock_full (rwlock, clockid, abstime);
+ }
+--- glibc-2.31.orig/nptl/pthread_rwlock_common.c
++++ glibc-2.31/nptl/pthread_rwlock_common.c
+@@ -280,7 +280,7 @@ __pthread_rwlock_rdunlock (pthread_rwloc
+ static __always_inline int
+ __pthread_rwlock_rdlock_full (pthread_rwlock_t *rwlock,
+ clockid_t clockid,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ unsigned int r;
+
+@@ -587,7 +587,7 @@ __pthread_rwlock_wrunlock (pthread_rwloc
+ static __always_inline int
+ __pthread_rwlock_wrlock_full (pthread_rwlock_t *rwlock,
+ clockid_t clockid,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ /* Make sure any passed in clockid and timeout value are valid. Note that
+ the previous implementation assumed that this check *must* not be
+--- glibc-2.31.orig/nptl/pthread_rwlock_timedrdlock.c
++++ glibc-2.31/nptl/pthread_rwlock_timedrdlock.c
+@@ -21,7 +21,7 @@
+ /* See pthread_rwlock_common.c. */
+ int
+ pthread_rwlock_timedrdlock (pthread_rwlock_t *rwlock,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ return __pthread_rwlock_rdlock_full (rwlock, CLOCK_REALTIME, abstime);
+ }
+--- glibc-2.31.orig/nptl/pthread_rwlock_timedwrlock.c
++++ glibc-2.31/nptl/pthread_rwlock_timedwrlock.c
+@@ -21,7 +21,7 @@
+ /* See pthread_rwlock_common.c. */
+ int
+ pthread_rwlock_timedwrlock (pthread_rwlock_t *rwlock,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ return __pthread_rwlock_wrlock_full (rwlock, CLOCK_REALTIME, abstime);
+ }
+--- glibc-2.31.orig/nptl/pthread_timedjoin.c
++++ glibc-2.31/nptl/pthread_timedjoin.c
+@@ -20,7 +20,7 @@
+
+ int
+ __pthread_timedjoin_np (pthread_t threadid, void **thread_return,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ return __pthread_clockjoin_ex (threadid, thread_return,
+ CLOCK_REALTIME, abstime, true);
+--- glibc-2.31.orig/nptl/sem_clockwait.c
++++ glibc-2.31/nptl/sem_clockwait.c
+@@ -23,7 +23,7 @@
+
+ int
+ sem_clockwait (sem_t *sem, clockid_t clockid,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ /* Check that supplied clockid is one we support, even if we don't end up
+ waiting. */
+--- glibc-2.31.orig/nptl/sem_timedwait.c
++++ glibc-2.31/nptl/sem_timedwait.c
+@@ -23,7 +23,7 @@
+ /* This is in a separate file because because sem_timedwait is only provided
+ if __USE_XOPEN2K is defined. */
+ int
+-sem_timedwait (sem_t *sem, const struct timespec *abstime)
++sem_timedwait (sem_t *sem, const struct __timespec64 *abstime)
+ {
+ if (! valid_nanoseconds (abstime->tv_nsec))
+ {
+--- glibc-2.31.orig/nptl/sem_waitcommon.c
++++ glibc-2.31/nptl/sem_waitcommon.c
+@@ -104,7 +104,7 @@ __sem_wait_cleanup (void *arg)
+ static int
+ __attribute__ ((noinline))
+ do_futex_wait (struct new_sem *sem, clockid_t clockid,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ int err;
+
+@@ -163,7 +163,7 @@ __new_sem_wait_fast (struct new_sem *sem
+ static int
+ __attribute__ ((noinline))
+ __new_sem_wait_slow (struct new_sem *sem, clockid_t clockid,
+- const struct timespec *abstime)
++ const struct __timespec64 *abstime)
+ {
+ int err = 0;
+
+--- glibc-2.31.orig/nscd/nscd_helper.c
++++ glibc-2.31/nscd/nscd_helper.c
+@@ -59,8 +59,8 @@ wait_on_socket (int sock, long int usect
+ /* Handle the case where the poll() call is interrupted by a
+ signal. We cannot just use TEMP_FAILURE_RETRY since it might
+ lead to infinite loops. */
+- struct timespec now;
+- __clock_gettime (CLOCK_REALTIME, &now);
++ struct __timespec64 now;
++ __clock_gettime64 (CLOCK_REALTIME, &now);
+ long int end = (now.tv_sec * 1000 + usectmo
+ + (now.tv_nsec + 500000) / 1000000);
+ long int timeout = usectmo;
+@@ -71,7 +71,7 @@ wait_on_socket (int sock, long int usect
+ break;
+
+ /* Recompute the timeout time. */
+- __clock_gettime (CLOCK_REALTIME, &now);
++ __clock_gettime64 (CLOCK_REALTIME, &now);
+ timeout = end - ((now.tv_sec * 1000
+ + (now.tv_nsec + 500000) / 1000000));
+ }
+@@ -212,8 +212,8 @@ open_socket (request_type type, const ch
+
+ /* The daemon is busy wait for it. */
+ int to;
+- struct timespec now;
+- __clock_gettime (CLOCK_REALTIME, &now);
++ struct __timespec64 now;
++ __clock_gettime64 (CLOCK_REALTIME, &now);
+ if (first_try)
+ {
+ tvend.tv_nsec = now.tv_nsec;
+--- glibc-2.31.orig/posix/nanosleep.c
++++ glibc-2.31/posix/nanosleep.c
+@@ -21,10 +21,10 @@
+
+ /* Pause execution for a number of nanoseconds. */
+ int
+-__nanosleep (const struct timespec *requested_time,
+- struct timespec *remaining)
++__nanosleep (const struct __timespec64 *requested_time,
++ struct __timespec64 *remaining)
+ {
+- int ret = __clock_nanosleep (CLOCK_REALTIME, 0, requested_time, remaining);
++ int ret = __clock_nanosleep_time64 (CLOCK_REALTIME, 0, requested_time, remaining);
+ if (ret != 0)
+ {
+ __set_errno (ret);
+--- glibc-2.31.orig/posix/sys/wait.h
++++ glibc-2.31/posix/sys/wait.h
+@@ -126,7 +126,7 @@ extern int waitid (idtype_t __idtype, __
+ || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K)
+ /* This being here makes the prototypes valid whether or not
+ we have already included <sys/resource.h> to define `struct rusage'. */
+-struct rusage;
++struct __rusage64;
+
+ /* Wait for a child to exit. When one does, put its status in *STAT_LOC and
+ return its process ID. For errors return (pid_t) -1. If USAGE is not
+@@ -134,18 +134,18 @@ struct rusage;
+ WUNTRACED bit is set in OPTIONS, return status for stopped children;
+ otherwise don't. */
+ extern __pid_t wait3 (int *__stat_loc, int __options,
+- struct rusage * __usage) __THROWNL;
++ struct __rusage64 * __usage) __THROWNL;
+ #endif
+
+ #ifdef __USE_MISC
+ /* PID is like waitpid. Other args are like wait3. */
+ extern __pid_t wait4 (__pid_t __pid, int *__stat_loc, int __options,
+- struct rusage *__usage) __THROWNL;
++ struct __rusage64 *__usage) __THROWNL;
+
+ # ifdef __USE_TIME_BITS64
+ # if defined(__REDIRECT_NTHNL)
+ extern __pid_t __REDIRECT_NTHNL (wait4, (__pid_t __pid, int *__stat_loc,
+- int __options, struct rusage *__usage),
++ int __options, struct __rusage64 *__usage),
+ __wait4_time64);
+ # else
+ # define wait4 __wait4_time64
+--- glibc-2.31.orig/posix/wait3.c
++++ glibc-2.31/posix/wait3.c
+@@ -17,6 +17,7 @@
+
+ #include <sys/wait.h>
+ #include <sys/types.h>
++#include <sys/resource.h>
+
+ /* Wait for a child to exit. When one does, put its status in *STAT_LOC and
+ return its process ID. For errors return (pid_t) -1. If USAGE is not nil,
+@@ -24,9 +25,9 @@
+ there. If the WUNTRACED bit is set in OPTIONS, return status for stopped
+ children; otherwise don't. */
+ pid_t
+-__wait3 (int *stat_loc, int options, struct rusage *usage)
++__wait3 (int *stat_loc, int options, struct __rusage64 *usage)
+ {
+- return __wait4 (WAIT_ANY, stat_loc, options, usage);
++ return __wait4_time64 (WAIT_ANY, stat_loc, options, usage);
+ }
+
+ weak_alias (__wait3, wait3)
+--- glibc-2.31.orig/posix/waitpid.c
++++ glibc-2.31/posix/waitpid.c
+@@ -18,7 +18,7 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <sys/wait.h>
+-
++#include <sys/resource.h>
+
+ /* Wait for a child matching PID to die.
+ If PID is greater than 0, match any process whose process ID is PID.
+@@ -35,7 +35,7 @@
+ pid_t
+ __waitpid (pid_t pid, int *stat_loc, int options)
+ {
+- return __wait4 (pid, stat_loc, options, NULL);
++ return __wait4_time64 (pid, stat_loc, options, NULL);
+ }
+ libc_hidden_def (__waitpid)
+ weak_alias (__waitpid, waitpid)
+--- glibc-2.31.orig/resource/vtimes.c
++++ glibc-2.31/resource/vtimes.c
+@@ -32,9 +32,9 @@ vtimes_one (struct vtimes *vt, enum __ru
+ {
+ if (vt != NULL)
+ {
+- struct rusage usage;
++ struct __rusage64 usage;
+
+- if (__getrusage (who, &usage) < 0)
++ if (__getrusage64 (who, &usage) < 0)
+ return -1;
+
+ vt->vm_utime = TIMEVAL_TO_VTIMES (usage.ru_utime);
+--- glibc-2.31.orig/sunrpc/auth_des.c
++++ glibc-2.31/sunrpc/auth_des.c
+@@ -247,13 +247,13 @@ authdes_marshal (AUTH *auth, XDR *xdrs)
+ int status;
+ int len;
+ register int32_t *ixdr;
+- struct timespec now;
++ struct __timespec64 now;
+
+ /*
+ * Figure out the "time", accounting for any time difference
+ * with the server if necessary.
+ */
+- __clock_gettime (CLOCK_REALTIME, &now);
++ __clock_gettime64 (CLOCK_REALTIME, &now);
+ ad->ad_timestamp.tv_sec = now.tv_sec + ad->ad_timediff.tv_sec;
+ ad->ad_timestamp.tv_usec = (now.tv_nsec / 1000) + ad->ad_timediff.tv_usec;
+ if (ad->ad_timestamp.tv_usec >= MILLION)
+@@ -446,7 +446,7 @@ authdes_destroy (AUTH *auth)
+ static bool_t
+ synchronize (struct sockaddr *syncaddr, struct rpc_timeval *timep)
+ {
+- struct timespec mytime;
++ struct __timespec64 mytime;
+ struct rpc_timeval timeout;
+ long int myusec;
+
+@@ -455,7 +455,7 @@ synchronize (struct sockaddr *syncaddr,
+ if (rtime ((struct sockaddr_in *) syncaddr, timep, &timeout) < 0)
+ return FALSE;
+
+- __clock_gettime (CLOCK_REALTIME, &mytime);
++ __clock_gettime64 (CLOCK_REALTIME, &mytime);
+ timep->tv_sec -= mytime.tv_sec;
+ myusec = mytime.tv_nsec / 1000;
+ if (myusec > timep->tv_usec)
+--- glibc-2.31.orig/sunrpc/auth_unix.c
++++ glibc-2.31/sunrpc/auth_unix.c
+@@ -97,7 +97,7 @@ authunix_create (char *machname, uid_t u
+ {
+ struct authunix_parms aup;
+ char mymem[MAX_AUTH_BYTES];
+- struct timespec now;
++ struct __timespec64 now;
+ XDR xdrs;
+ AUTH *auth;
+ struct audata *au;
+@@ -123,7 +123,7 @@ no_memory:
+ /*
+ * fill in param struct from the given params
+ */
+- __clock_gettime (CLOCK_REALTIME, &now);
++ __clock_gettime64 (CLOCK_REALTIME, &now);
+ aup.aup_time = now.tv_sec;
+ aup.aup_machname = machname;
+ aup.aup_uid = uid;
+@@ -277,7 +277,7 @@ authunix_refresh (AUTH *auth)
+ {
+ struct audata *au = AUTH_PRIVATE (auth);
+ struct authunix_parms aup;
+- struct timespec now;
++ struct __timespec64 now;
+ XDR xdrs;
+ int stat;
+
+@@ -298,7 +298,7 @@ authunix_refresh (AUTH *auth)
+ goto done;
+
+ /* update the time and serialize in place */
+- __clock_gettime (CLOCK_REALTIME, &now);
++ __clock_gettime64 (CLOCK_REALTIME, &now);
+ aup.aup_time = now.tv_sec;
+ xdrs.x_op = XDR_ENCODE;
+ XDR_SETPOS (&xdrs, 0);
+--- glibc-2.31.orig/sunrpc/clnt_gen.c
++++ glibc-2.31/sunrpc/clnt_gen.c
+@@ -52,7 +52,7 @@ clnt_create (const char *hostname, u_lon
+ struct sockaddr_in sin;
+ struct sockaddr_un sun;
+ int sock;
+- struct timeval tv;
++ struct __timeval64 tv;
+ CLIENT *client;
+
+ if (strcmp (proto, "unix") == 0)
+--- glibc-2.31.orig/sunrpc/clnt_raw.c
++++ glibc-2.31/sunrpc/clnt_raw.c
+@@ -62,7 +62,7 @@ struct clntraw_private_s
+ #define clntraw_private RPC_THREAD_VARIABLE(clntraw_private_s)
+
+ static enum clnt_stat clntraw_call (CLIENT *, u_long, xdrproc_t, caddr_t,
+- xdrproc_t, caddr_t, struct timeval);
++ xdrproc_t, caddr_t, struct __timeval64);
+ static void clntraw_abort (void);
+ static void clntraw_geterr (CLIENT *, struct rpc_err *);
+ static bool_t clntraw_freeres (CLIENT *, xdrproc_t, caddr_t);
+@@ -130,7 +130,7 @@ libc_hidden_nolink_sunrpc (clntraw_creat
+
+ static enum clnt_stat
+ clntraw_call (CLIENT *h, u_long proc, xdrproc_t xargs, caddr_t argsp,
+- xdrproc_t xresults, caddr_t resultsp, struct timeval timeout)
++ xdrproc_t xresults, caddr_t resultsp, struct __timeval64 timeout)
+ {
+ struct clntraw_private_s *clp = clntraw_private;
+ XDR *xdrs = &clp->xdr_stream;
+--- glibc-2.31.orig/sunrpc/clnt_simp.c
++++ glibc-2.31/sunrpc/clnt_simp.c
+@@ -58,7 +58,7 @@ callrpc (const char *host, u_long prognu
+ struct callrpc_private_s *crp = callrpc_private;
+ struct sockaddr_in server_addr;
+ enum clnt_stat clnt_stat;
+- struct timeval timeout, tottimeout;
++ struct __timeval64 timeout, tottimeout;
+
+ if (crp == 0)
+ {
+--- glibc-2.31.orig/sunrpc/clnt_tcp.c
++++ glibc-2.31/sunrpc/clnt_tcp.c
+@@ -64,7 +64,7 @@ struct ct_data
+ {
+ int ct_sock;
+ bool_t ct_closeit;
+- struct timeval ct_wait;
++ struct __timeval64 ct_wait;
+ bool_t ct_waitset; /* wait set by clnt_control? */
+ struct sockaddr_in ct_addr;
+ struct rpc_err ct_error;
+@@ -77,7 +77,7 @@ static int readtcp (char *, char *, int)
+ static int writetcp (char *, char *, int);
+
+ static enum clnt_stat clnttcp_call (CLIENT *, u_long, xdrproc_t, caddr_t,
+- xdrproc_t, caddr_t, struct timeval);
++ xdrproc_t, caddr_t, struct __timeval64);
+ static void clnttcp_abort (void);
+ static void clnttcp_geterr (CLIENT *, struct rpc_err *);
+ static bool_t clnttcp_freeres (CLIENT *, xdrproc_t, caddr_t);
+@@ -227,7 +227,7 @@ libc_hidden_nolink_sunrpc (clnttcp_creat
+ static enum clnt_stat
+ clnttcp_call (CLIENT *h, u_long proc, xdrproc_t xdr_args, caddr_t args_ptr,
+ xdrproc_t xdr_results, caddr_t results_ptr,
+- struct timeval timeout)
++ struct __timeval64 timeout)
+ {
+ struct ct_data *ct = (struct ct_data *) h->cl_private;
+ XDR *xdrs = &(ct->ct_xdrs);
+@@ -368,11 +368,11 @@ clnttcp_control (CLIENT *cl, int request
+ ct->ct_closeit = FALSE;
+ break;
+ case CLSET_TIMEOUT:
+- ct->ct_wait = *(struct timeval *) info;
++ ct->ct_wait = *(struct __timeval64 *) info;
+ ct->ct_waitset = TRUE;
+ break;
+ case CLGET_TIMEOUT:
+- *(struct timeval *) info = ct->ct_wait;
++ *(struct __timeval64 *) info = ct->ct_wait;
+ break;
+ case CLGET_SERVER_ADDR:
+ *(struct sockaddr_in *) info = ct->ct_addr;
+--- glibc-2.31.orig/sunrpc/clnt_udp.c
++++ glibc-2.31/sunrpc/clnt_udp.c
+@@ -65,7 +65,7 @@ extern u_long _create_xid (void);
+ * UDP bases client side rpc operations
+ */
+ static enum clnt_stat clntudp_call (CLIENT *, u_long, xdrproc_t, caddr_t,
+- xdrproc_t, caddr_t, struct timeval);
++ xdrproc_t, caddr_t, struct __timeval64);
+ static void clntudp_abort (void);
+ static void clntudp_geterr (CLIENT *, struct rpc_err *);
+ static bool_t clntudp_freeres (CLIENT *, xdrproc_t, caddr_t);
+@@ -93,8 +93,8 @@ struct cu_data
+ bool_t cu_closeit;
+ struct sockaddr_in cu_raddr;
+ int cu_rlen;
+- struct timeval cu_wait;
+- struct timeval cu_total;
++ struct __timeval64 cu_wait;
++ struct __timeval64 cu_total;
+ struct rpc_err cu_error;
+ XDR cu_outxdrs;
+ u_int cu_xdrpos;
+@@ -122,7 +122,7 @@ struct cu_data
+ */
+ CLIENT *
+ __libc_clntudp_bufcreate (struct sockaddr_in *raddr, u_long program,
+- u_long version, struct timeval wait, int *sockp,
++ u_long version, struct __timeval64 wait, int *sockp,
+ u_int sendsz, u_int recvsz, int flags)
+ {
+ CLIENT *cl;
+@@ -216,7 +216,7 @@ libc_hidden_nolink_sunrpc (__libc_clntud
+
+ CLIENT *
+ clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version,
+- struct timeval wait, int *sockp, u_int sendsz,
++ struct __timeval64 wait, int *sockp, u_int sendsz,
+ u_int recvsz)
+ {
+ return __libc_clntudp_bufcreate (raddr, program, version, wait,
+@@ -226,7 +226,7 @@ libc_hidden_nolink_sunrpc (clntudp_bufcr
+
+ CLIENT *
+ clntudp_create (struct sockaddr_in *raddr, u_long program, u_long version,
+- struct timeval wait, int *sockp)
++ struct __timeval64 wait, int *sockp)
+ {
+ return __libc_clntudp_bufcreate (raddr, program, version, wait,
+ sockp, UDPMSGSIZE, UDPMSGSIZE, 0);
+@@ -275,7 +275,7 @@ clntudp_call (/* client handle */
+ /* pointer to results */
+ caddr_t resultsp,
+ /* seconds to wait before giving up */
+- struct timeval utimeout)
++ struct __timeval64 utimeout)
+ {
+ struct cu_data *cu = (struct cu_data *) cl->cl_private;
+ XDR *xdrs;
+@@ -309,7 +309,7 @@ clntudp_call (/* client handle */
+ below. */
+ if (xargs != NULL)
+ {
+- struct timeval tv;
++ struct __timeval64 tv;
+ if (cu->cu_total.tv_usec == -1)
+ /* Use supplied timeout. */
+ tv = utimeout;
+@@ -565,16 +565,16 @@ clntudp_control (CLIENT *cl, int request
+ cu->cu_closeit = FALSE;
+ break;
+ case CLSET_TIMEOUT:
+- cu->cu_total = *(struct timeval *) info;
++ cu->cu_total = *(struct __timeval64 *) info;
+ break;
+ case CLGET_TIMEOUT:
+- *(struct timeval *) info = cu->cu_total;
++ *(struct __timeval64 *) info = cu->cu_total;
+ break;
+ case CLSET_RETRY_TIMEOUT:
+- cu->cu_wait = *(struct timeval *) info;
++ cu->cu_wait = *(struct __timeval64 *) info;
+ break;
+ case CLGET_RETRY_TIMEOUT:
+- *(struct timeval *) info = cu->cu_wait;
++ *(struct __timeval64 *) info = cu->cu_wait;
+ break;
+ case CLGET_SERVER_ADDR:
+ *(struct sockaddr_in *) info = cu->cu_raddr;
+--- glibc-2.31.orig/sunrpc/clnt_unix.c
++++ glibc-2.31/sunrpc/clnt_unix.c
+@@ -65,7 +65,7 @@ struct ct_data
+ {
+ int ct_sock;
+ bool_t ct_closeit;
+- struct timeval ct_wait;
++ struct __timeval64 ct_wait;
+ bool_t ct_waitset; /* wait set by clnt_control? */
+ struct sockaddr_un ct_addr;
+ struct rpc_err ct_error;
+@@ -78,7 +78,7 @@ static int readunix (char *, char *, int
+ static int writeunix (char *, char *, int);
+
+ static enum clnt_stat clntunix_call (CLIENT *, u_long, xdrproc_t, caddr_t,
+- xdrproc_t, caddr_t, struct timeval);
++ xdrproc_t, caddr_t, struct __timeval64);
+ static void clntunix_abort (void);
+ static void clntunix_geterr (CLIENT *, struct rpc_err *);
+ static bool_t clntunix_freeres (CLIENT *, xdrproc_t, caddr_t);
+@@ -206,7 +206,7 @@ libc_hidden_nolink_sunrpc (clntunix_crea
+ static enum clnt_stat
+ clntunix_call (CLIENT *h, u_long proc, xdrproc_t xdr_args, caddr_t args_ptr,
+ xdrproc_t xdr_results, caddr_t results_ptr,
+- struct timeval timeout)
++ struct __timeval64 timeout)
+ {
+ struct ct_data *ct = (struct ct_data *) h->cl_private;
+ XDR *xdrs = &(ct->ct_xdrs);
+@@ -343,10 +343,10 @@ clntunix_control (CLIENT *cl, int reques
+ ct->ct_closeit = FALSE;
+ break;
+ case CLSET_TIMEOUT:
+- ct->ct_wait = *(struct timeval *) info;
++ ct->ct_wait = *(struct __timeval64 *) info;
+ break;
+ case CLGET_TIMEOUT:
+- *(struct timeval *) info = ct->ct_wait;
++ *(struct __timeval64 *) info = ct->ct_wait;
+ break;
+ case CLGET_SERVER_ADDR:
+ *(struct sockaddr_un *) info = ct->ct_addr;
+--- glibc-2.31.orig/sunrpc/create_xid.c
++++ glibc-2.31/sunrpc/create_xid.c
+@@ -39,9 +39,9 @@ _create_xid (void)
+ pid_t pid = getpid ();
+ if (is_initialized != pid)
+ {
+- struct timespec now;
++ struct __timespec64 now;
+
+- __clock_gettime (CLOCK_REALTIME, &now);
++ __clock_gettime64 (CLOCK_REALTIME, &now);
+ __srand48_r (now.tv_sec ^ now.tv_nsec ^ pid,
+ &__rpc_lrand48_data);
+ is_initialized = pid;
+--- glibc-2.31.orig/sunrpc/key_call.c
++++ glibc-2.31/sunrpc/key_call.c
+@@ -63,8 +63,8 @@ extern int _openchild (const char *comma
+ static int key_call (u_long, xdrproc_t xdr_arg, char *,
+ xdrproc_t xdr_rslt, char *);
+
+-static const struct timeval trytimeout = {KEY_TIMEOUT, 0};
+-static const struct timeval tottimeout = {KEY_TIMEOUT *KEY_NRETRY, 0};
++static const struct __timeval64 trytimeout = {KEY_TIMEOUT, 0};
++static const struct __timeval64 tottimeout = {KEY_TIMEOUT *KEY_NRETRY, 0};
+
+ int
+ key_setsecret (char *secretkey)
+@@ -388,7 +388,7 @@ static CLIENT *
+ getkeyserv_handle (int vers)
+ {
+ struct key_call_private *kcp = key_call_private_main;
+- struct timeval wait_time;
++ struct __timeval64 wait_time;
+ int fd;
+ struct sockaddr_un name;
+ socklen_t namelen = sizeof(struct sockaddr_un);
+@@ -480,7 +480,7 @@ key_call_socket (u_long proc, xdrproc_t
+ xdrproc_t xdr_rslt, char *rslt)
+ {
+ CLIENT *clnt;
+- struct timeval wait_time;
++ struct __timeval64 wait_time;
+ int result = 0;
+
+ __libc_lock_lock (keycall_lock);
+--- glibc-2.31.orig/sunrpc/pm_getmaps.c
++++ glibc-2.31/sunrpc/pm_getmaps.c
+@@ -55,7 +55,7 @@ struct pmaplist *
+ pmap_getmaps (struct sockaddr_in *address)
+ {
+ struct pmaplist *head = (struct pmaplist *) NULL;
+- struct timeval minutetimeout;
++ struct __timeval64 minutetimeout;
+ CLIENT *client;
+ bool closeit = false;
+
+--- glibc-2.31.orig/sunrpc/pm_getport.c
++++ glibc-2.31/sunrpc/pm_getport.c
+@@ -85,8 +85,8 @@ __libc_rpc_getport (struct sockaddr_in *
+ u_long version, u_int protocol, time_t timeout_sec,
+ time_t tottimeout_sec)
+ {
+- const struct timeval timeout = {timeout_sec, 0};
+- const struct timeval tottimeout = {tottimeout_sec, 0};
++ const struct __timeval64 timeout = {timeout_sec, 0};
++ const struct __timeval64 tottimeout = {tottimeout_sec, 0};
+
+ u_short port = 0;
+ int socket = -1;
+--- glibc-2.31.orig/sunrpc/pmap_clnt.c
++++ glibc-2.31/sunrpc/pmap_clnt.c
+@@ -95,8 +95,8 @@ __get_myaddress (struct sockaddr_in *add
+ }
+
+
+-static const struct timeval timeout = {5, 0};
+-static const struct timeval tottimeout = {60, 0};
++static const struct __timeval64 timeout = {5, 0};
++static const struct __timeval64 tottimeout = {60, 0};
+
+ /*
+ * Set a mapping between program,version and port.
+--- glibc-2.31.orig/sunrpc/pmap_rmt.c
++++ glibc-2.31/sunrpc/pmap_rmt.c
+@@ -55,7 +55,7 @@
+
+ extern u_long _create_xid (void);
+
+-static const struct timeval timeout = {3, 0};
++static const struct __timeval64 timeout = {3, 0};
+
+ /*
+ * pmapper remote-call-service interface.
+@@ -67,7 +67,7 @@ static const struct timeval timeout = {3
+ enum clnt_stat
+ pmap_rmtcall (struct sockaddr_in *addr, u_long prog, u_long vers, u_long proc,
+ xdrproc_t xdrargs, caddr_t argsp, xdrproc_t xdrres, caddr_t resp,
+- struct timeval tout, u_long *port_ptr)
++ struct __timeval64 tout, u_long *port_ptr)
+ {
+ int socket = -1;
+ CLIENT *client;
+--- glibc-2.31.orig/sunrpc/rpc/clnt.h
++++ glibc-2.31/sunrpc/rpc/clnt.h
+@@ -39,6 +39,7 @@
+ #include <rpc/types.h>
+ #include <rpc/auth.h>
+ #include <sys/un.h>
++#include <time.h>
+
+ __BEGIN_DECLS
+
+@@ -131,7 +132,7 @@ struct CLIENT {
+ AUTH *cl_auth; /* authenticator */
+ struct clnt_ops {
+ enum clnt_stat (*cl_call) (CLIENT *, u_long, xdrproc_t, caddr_t, xdrproc_t,
+- caddr_t, struct timeval);
++ caddr_t, struct __timeval64);
+ /* call remote procedure */
+ void (*cl_abort) (void); /* abort a call */
+ void (*cl_geterr) (CLIENT *, struct rpc_err *);
+@@ -330,11 +331,11 @@ extern CLIENT *clnttcp_create (struct so
+ * u_int recvsz;
+ */
+ extern CLIENT *clntudp_create (struct sockaddr_in *__raddr, u_long __program,
+- u_long __version, struct timeval __wait_resend,
++ u_long __version, struct __timeval64 __wait_resend,
+ int *__sockp) __THROW;
+ extern CLIENT *clntudp_bufcreate (struct sockaddr_in *__raddr,
+ u_long __program, u_long __version,
+- struct timeval __wait_resend, int *__sockp,
++ struct __timeval64 __wait_resend, int *__sockp,
+ u_int __sendsz, u_int __recvsz) __THROW;
+
+
+--- glibc-2.31.orig/sunrpc/rpc/pmap_clnt.h
++++ glibc-2.31/sunrpc/rpc/pmap_clnt.h
+@@ -77,7 +77,7 @@ extern enum clnt_stat pmap_rmtcall (stru
+ const u_long __proc,
+ xdrproc_t __xdrargs,
+ caddr_t __argsp, xdrproc_t __xdrres,
+- caddr_t __resp, struct timeval __tout,
++ caddr_t __resp, struct __timeval64 __tout,
+ u_long *__port_ptr) __THROW;
+ extern enum clnt_stat clnt_broadcast (const u_long __prog,
+ const u_long __vers,
+--- glibc-2.31.orig/sunrpc/svc.c
++++ glibc-2.31/sunrpc/svc.c
+@@ -555,7 +555,7 @@ __svc_accept_failed (void)
+ {
+ if (errno == EMFILE)
+ {
+- struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
++ struct __timespec64 ts = { .tv_sec = 0, .tv_nsec = 50000000 };
+ __nanosleep (&ts, NULL);
+ }
+ }
+--- glibc-2.31.orig/sunrpc/svcauth_des.c
++++ glibc-2.31/sunrpc/svcauth_des.c
+@@ -297,8 +297,8 @@ _svcauth_des (register struct svc_req *r
+ return AUTH_REJECTEDVERF; /* replay */
+ }
+ {
+- struct timespec now;
+- __clock_gettime (CLOCK_REALTIME, &now);
++ struct __timespec64 now;
++ __clock_gettime64 (CLOCK_REALTIME, &now);
+ TIMESPEC_TO_TIMEVAL (&current, &now);
+ }
+ current.tv_sec -= window; /* allow for expiration */
+--- glibc-2.31.orig/sunrpc/thrsvc.c
++++ glibc-2.31/sunrpc/thrsvc.c
+@@ -69,7 +69,7 @@ main (void)
+ SVCXPRT *svx;
+ CLIENT *clnt;
+ struct sockaddr_in sin;
+- struct timeval wait = { 5, 0 };
++ struct __timeval64 wait = { 5, 0 };
+ int sock = RPC_ANYSOCK;
+ struct rpc_arg a;
+
+--- glibc-2.31.orig/sunrpc/tst-svc_register.c
++++ glibc-2.31/sunrpc/tst-svc_register.c
+@@ -159,7 +159,7 @@ get_test_state (void)
+ int socket = RPC_ANYSOCK;
+ struct sockaddr_in address = rpcbind_address ();
+ CLIENT *client = clntudp_create
+- (&address, PMAPPROG, PMAPVERS, (struct timeval) { 1, 0}, &socket);
++ (&address, PMAPPROG, PMAPVERS, (struct __timeval64) { 1, 0}, &socket);
+ struct test_state result = { 0 };
+ TEST_VERIFY (clnt_call (client, PROC_GET_STATE_AND_EXIT,
+ (xdrproc_t) xdr_void, NULL,
+--- glibc-2.31.orig/sunrpc/tst-udp-error.c
++++ glibc-2.31/sunrpc/tst-udp-error.c
+@@ -47,7 +47,7 @@ do_test (void)
+
+ int sock = RPC_ANYSOCK;
+ CLIENT *clnt = clntudp_create
+- (&sin, 1, 2, (struct timeval) { 1, 0 }, &sock);
++ (&sin, 1, 2, (struct __timeval64) { 1, 0 }, &sock);
+ TEST_VERIFY_EXIT (clnt != NULL);
+ TEST_VERIFY (clnt_call (clnt, 3,
+ (xdrproc_t) xdr_void, NULL,
+--- glibc-2.31.orig/sunrpc/tst-udp-garbage.c
++++ glibc-2.31/sunrpc/tst-udp-garbage.c
+@@ -88,7 +88,7 @@ do_test (void)
+ int client_fd = RPC_ANYSOCK;
+ CLIENT *clnt = clntudp_create (&server_address,
+ 1, 2, /* Arbitrary RPC endpoint numbers. */
+- (struct timeval) { 1, 0 },
++ (struct __timeval64) { 1, 0 },
+ &client_fd);
+ if (clnt == NULL)
+ FAIL_EXIT1 ("clntudp_create: %m");
+@@ -96,7 +96,7 @@ do_test (void)
+ TEST_VERIFY (clnt_call (clnt, 3, /* Arbitrary RPC procedure number. */
+ (xdrproc_t) xdr_void, NULL,
+ (xdrproc_t) xdr_void, NULL,
+- ((struct timeval) { 1, 0 })));
++ ((struct __timeval64) { 1, 0 })));
+
+ return 0;
+ }
+--- glibc-2.31.orig/sunrpc/tst-udp-nonblocking.c
++++ glibc-2.31/sunrpc/tst-udp-nonblocking.c
+@@ -228,7 +228,7 @@ do_test (void)
+ int client_socket = xsocket (AF_INET, SOCK_DGRAM | SOCK_NONBLOCK, 0);
+ CLIENT *clnt = clntudp_create (&servers[0].address, PROGNUM, VERSNUM,
+ /* 5 seconds per-response timeout. */
+- ((struct timeval) { 5, 0 }),
++ ((struct __timeval64) { 5, 0 }),
+ &client_socket);
+ TEST_VERIFY (clnt != NULL);
+ clnt->cl_auth = authunix_create_default ();
+@@ -313,7 +313,7 @@ do_test (void)
+ printf ("info: requesting server %d termination\n", i);
+ client_socket = RPC_ANYSOCK;
+ clnt = clntudp_create (&servers[i].address, PROGNUM, VERSNUM,
+- ((struct timeval) { 5, 0 }),
++ ((struct __timeval64) { 5, 0 }),
+ &client_socket);
+ TEST_VERIFY_EXIT (clnt != NULL);
+ TEST_VERIFY (clnt_call (clnt, PROC_EXIT,
+--- glibc-2.31.orig/sunrpc/tst-udp-timeout.c
++++ glibc-2.31/sunrpc/tst-udp-timeout.c
+@@ -192,11 +192,11 @@ kill_server (void)
+
+ static struct test_response
+ test_call (CLIENT *clnt, int proc, struct test_query query,
+- struct timeval timeout)
++ struct __timeval64 timeout)
+ {
+ if (test_verbose)
+- printf ("info: test_call proc=%d timeout=%lu.%06lu\n",
+- proc, (unsigned long) timeout.tv_sec,
++ printf ("info: test_call proc=%d timeout=%llu.%06lu\n",
++ proc, (unsigned long long) timeout.tv_sec,
+ (unsigned long) timeout.tv_usec);
+ struct test_response response;
+ TEST_VERIFY_EXIT (clnt_call (clnt, proc,
+@@ -209,7 +209,7 @@ test_call (CLIENT *clnt, int proc, struc
+
+ static void
+ test_call_timeout (CLIENT *clnt, int proc, struct test_query query,
+- struct timeval timeout)
++ struct __timeval64 timeout)
+ {
+ struct test_response response;
+ TEST_VERIFY (clnt_call (clnt, proc,
+@@ -232,7 +232,7 @@ test_call_flush (CLIENT *clnt)
+ TEST_VERIFY_EXIT (clnt_call (clnt, PROC_RESET_SEQ,
+ (xdrproc_t) xdr_void, NULL,
+ (xdrproc_t) xdr_void, NULL,
+- ((struct timeval) { 5, 0 }))
++ ((struct __timeval64) { 5, 0 }))
+ == RPC_SUCCESS);
+ }
+
+@@ -268,7 +268,7 @@ test_udp_server (int port)
+ between them, but the total time spent waiting is not too
+ large. */
+ CLIENT *clnt = clntudp_create (&sin, PROGNUM, VERSNUM,
+- (struct timeval) { 1, 500 * 1000 },
++ (struct __timeval64) { 1, 500 * 1000 },
+ &sock);
+ TEST_VERIFY_EXIT (clnt != NULL);
+
+@@ -288,7 +288,7 @@ test_udp_server (int port)
+ (struct test_query) {
+ .a = 19, .b = 4, .timeout_ms = 500, .garbage_packets = 21,
+ },
+- (struct timeval) { 3, 0 });
++ (struct __timeval64) { 3, 0 });
+ TEST_VERIFY (response.sum == 23);
+ TEST_VERIFY (response.seq == 2);
+ double after = get_ticks ();
+@@ -307,7 +307,7 @@ test_udp_server (int port)
+ response = test_call
+ (clnt, PROC_ADD,
+ (struct test_query) { .a = 170, .b = 40, .wait_for_seq = 2 },
+- (struct timeval) { 3, 0 });
++ (struct __timeval64) { 3, 0 });
+ TEST_VERIFY (response.sum == 210);
+ TEST_VERIFY (response.seq == 2);
+ after = get_ticks ();
+@@ -326,7 +326,7 @@ test_udp_server (int port)
+ test_call_timeout
+ (clnt, PROC_ADD,
+ (struct test_query) { .a = 170, .b = 41, .wait_for_seq = 2 },
+- (struct timeval) { 0, 750 * 1000 });
++ (struct __timeval64) { 0, 750 * 1000 });
+ after = get_ticks ();
+ if (test_verbose)
+ printf ("info: 0.75 second timeout took %f seconds\n",
+@@ -345,7 +345,7 @@ test_udp_server (int port)
+ .a = 170, .b = 40, .timeout_ms = 1200,
+ .garbage_packets = with_garbage * 21
+ },
+- (struct timeval) { 0, 750 * 1000 });
++ (struct __timeval64) { 0, 750 * 1000 });
+ after = get_ticks ();
+ if (test_verbose)
+ printf ("info: test_udp_server: 0.75 second timeout took %f seconds"
+@@ -363,7 +363,7 @@ test_udp_server (int port)
+ .a = 170, .b = 40, .timeout_ms = 3000,
+ .garbage_packets = with_garbage * 30
+ },
+- (struct timeval) { 2, 500 * 1000 });
++ (struct __timeval64) { 2, 500 * 1000 });
+ after = get_ticks ();
+ if (test_verbose)
+ printf ("info: test_udp_server: 2.5 second timeout took %f seconds"
+@@ -377,7 +377,7 @@ test_udp_server (int port)
+ TEST_VERIFY_EXIT (clnt_call (clnt, PROC_EXIT,
+ (xdrproc_t) xdr_void, NULL,
+ (xdrproc_t) xdr_void, NULL,
+- ((struct timeval) { 5, 0 }))
++ ((struct __timeval64) { 5, 0 }))
+ == RPC_SUCCESS);
+ clnt_destroy (clnt);
+ }
+--- glibc-2.31.orig/sysdeps/htl/pthreadP.h
++++ glibc-2.31/sysdeps/htl/pthreadP.h
+@@ -37,7 +37,7 @@ extern int __pthread_mutex_destroy (pthr
+ extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
+ extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex);
+ extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex,
+- const struct timespec *__abstime);
++ const struct __timespec64 *__abstime);
+ extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
+ extern int __pthread_mutexattr_init (pthread_mutexattr_t *attr);
+ extern int __pthread_mutexattr_settype (pthread_mutexattr_t *attr, int kind);
+@@ -49,7 +49,7 @@ extern int __pthread_cond_broadcast (pth
+ extern int __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex);
+ extern int __pthread_cond_timedwait (pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+- const struct timespec *abstime);
++ const struct __timespec64 *abstime);
+ extern int __pthread_cond_destroy (pthread_cond_t *cond);
+
+ typedef struct __cthread *__cthread_t;
+--- glibc-2.31.orig/sysdeps/nptl/futex-internal.h
++++ glibc-2.31/sysdeps/nptl/futex-internal.h
+@@ -211,7 +211,7 @@ futex_wait_cancelable (unsigned int *fut
+ */
+ static __always_inline int
+ futex_reltimed_wait (unsigned int* futex_word, unsigned int expected,
+- const struct timespec* reltime, int private)
++ const struct __timespec64* reltime, int private)
+ {
+ int err = lll_futex_timed_wait (futex_word, expected, reltime, private);
+ switch (err)
+@@ -237,7 +237,7 @@ futex_reltimed_wait (unsigned int* futex
+ static __always_inline int
+ futex_reltimed_wait_cancelable (unsigned int* futex_word,
+ unsigned int expected,
+- const struct timespec* reltime, int private)
++ const struct __timespec64* reltime, int private)
+ {
+ int oldtype;
+ oldtype = LIBC_CANCEL_ASYNC ();
+@@ -275,7 +275,7 @@ futex_abstimed_supported_clockid (clocki
+ static __always_inline int
+ futex_abstimed_wait (unsigned int* futex_word, unsigned int expected,
+ clockid_t clockid,
+- const struct timespec* abstime, int private)
++ const struct __timespec64* abstime, int private)
+ {
+ /* Work around the fact that the kernel rejects negative timeout values
+ despite them being valid. */
+@@ -309,7 +309,7 @@ static __always_inline int
+ futex_abstimed_wait_cancelable (unsigned int* futex_word,
+ unsigned int expected,
+ clockid_t clockid,
+- const struct timespec* abstime, int private)
++ const struct __timespec64* abstime, int private)
+ {
+ /* Work around the fact that the kernel rejects negative timeout values
+ despite them being valid. */
+@@ -406,7 +406,7 @@ futex_wake (unsigned int* futex_word, in
+ - ETIMEDOUT if the ABSTIME expires.
+ */
+ static __always_inline int
+-futex_lock_pi (unsigned int *futex_word, const struct timespec *abstime,
++futex_lock_pi (unsigned int *futex_word, const struct __timespec64 *abstime,
+ int private)
+ {
+ int err = lll_futex_timed_lock_pi (futex_word, abstime, private);
+--- glibc-2.31.orig/sysdeps/nptl/lowlevellock.h
++++ glibc-2.31/sysdeps/nptl/lowlevellock.h
+@@ -123,7 +123,7 @@ extern void __lll_lock_wait (int *futex,
+
+
+ extern int __lll_clocklock_wait (int *futex, int val, clockid_t,
+- const struct timespec *,
++ const struct __timespec64 *,
+ int private) attribute_hidden;
+
+ #define lll_timedwait(futex, val, clockid, abstime, private) \
+--- glibc-2.31.orig/sysdeps/nptl/pthread-functions.h
++++ glibc-2.31/sysdeps/nptl/pthread-functions.h
+@@ -34,13 +34,13 @@ struct pthread_functions
+ int (*ptr___pthread_cond_signal) (pthread_cond_t *);
+ int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *);
+ int (*ptr___pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
+- const struct timespec *);
++ const struct __timespec64 *);
+ int (*ptr___pthread_cond_broadcast_2_0) (pthread_cond_2_0_t *);
+ int (*ptr___pthread_cond_signal_2_0) (pthread_cond_2_0_t *);
+ int (*ptr___pthread_cond_wait_2_0) (pthread_cond_2_0_t *, pthread_mutex_t *);
+ int (*ptr___pthread_cond_timedwait_2_0) (pthread_cond_2_0_t *,
+ pthread_mutex_t *,
+- const struct timespec *);
++ const struct __timespec64 *);
+ void (*ptr___pthread_exit) (void *) __attribute__ ((__noreturn__));
+ int (*ptr_pthread_mutex_destroy) (pthread_mutex_t *);
+ int (*ptr_pthread_mutex_init) (pthread_mutex_t *,
+--- glibc-2.31.orig/sysdeps/nptl/pthread.h
++++ glibc-2.31/sysdeps/nptl/pthread.h
+@@ -226,7 +226,7 @@ extern int pthread_tryjoin_np (pthread_t
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
+- const struct timespec *__abstime);
++ const struct __timespec64 *__abstime);
+
+ /* Make calling thread wait for termination of the thread TH, but only
+ until TIMEOUT measured against the clock specified by CLOCKID. The
+@@ -237,7 +237,7 @@ extern int pthread_timedjoin_np (pthread
+ __THROW. */
+ extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return,
+ clockid_t __clockid,
+- const struct timespec *__abstime);
++ const struct __timespec64 *__abstime);
+ #endif
+
+ /* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
+@@ -741,14 +741,14 @@ extern int pthread_mutex_lock (pthread_m
+ #ifdef __USE_XOPEN2K
+ /* Wait until lock becomes available, or specified time passes. */
+ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
+- const struct timespec *__restrict
++ const struct __timespec64 *__restrict
+ __abstime) __THROWNL __nonnull ((1, 2));
+ #endif
+
+ #ifdef __USE_GNU
+ extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
+ clockid_t __clockid,
+- const struct timespec *__restrict
++ const struct __timespec64 *__restrict
+ __abstime) __THROWNL __nonnull ((1, 3));
+ #endif
+
+@@ -887,14 +887,14 @@ extern int pthread_rwlock_tryrdlock (pth
+ # ifdef __USE_XOPEN2K
+ /* Try to acquire read lock for RWLOCK or return after specfied time. */
+ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
+- const struct timespec *__restrict
++ const struct __timespec64 *__restrict
+ __abstime) __THROWNL __nonnull ((1, 2));
+ # endif
+
+ # ifdef __USE_GNU
+ extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
+ clockid_t __clockid,
+- const struct timespec *__restrict
++ const struct __timespec64 *__restrict
+ __abstime) __THROWNL __nonnull ((1, 3));
+ # endif
+
+@@ -909,14 +909,14 @@ extern int pthread_rwlock_trywrlock (pth
+ # ifdef __USE_XOPEN2K
+ /* Try to acquire write lock for RWLOCK or return after specfied time. */
+ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
+- const struct timespec *__restrict
++ const struct __timespec64 *__restrict
+ __abstime) __THROWNL __nonnull ((1, 2));
+ # endif
+
+ # ifdef __USE_GNU
+ extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
+ clockid_t __clockid,
+- const struct timespec *__restrict
++ const struct __timespec64 *__restrict
+ __abstime) __THROWNL __nonnull ((1, 3));
+ # endif
+
+@@ -996,7 +996,7 @@ extern int pthread_cond_wait (pthread_co
+ __THROW. */
+ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
+ pthread_mutex_t *__restrict __mutex,
+- const struct timespec *__restrict __abstime)
++ const struct __timespec64 *__restrict __abstime)
+ __nonnull ((1, 2, 3));
+
+ # ifdef __USE_GNU
+@@ -1010,7 +1010,7 @@ extern int pthread_cond_timedwait (pthre
+ extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
+ pthread_mutex_t *__restrict __mutex,
+ __clockid_t __clock_id,
+- const struct timespec *__restrict __abstime)
++ const struct __timespec64 *__restrict __abstime)
+ __nonnull ((1, 2, 4));
+ # endif
+
+--- glibc-2.31.orig/sysdeps/posix/profil.c
++++ glibc-2.31/sysdeps/posix/profil.c
+@@ -20,6 +20,7 @@
+ #include <unistd.h>
+ #include <errno.h>
+ #include <signal.h>
++#include <time.h>
+ #include <sys/time.h>
+ #include <stdint.h>
+ #include <libc-internal.h>
+@@ -65,10 +66,10 @@ int
+ __profil (u_short *sample_buffer, size_t size, size_t offset, u_int scale)
+ {
+ struct sigaction act;
+- struct itimerval timer;
++ struct __itimerval64 timer;
+ #if !IS_IN (rtld)
+ static struct sigaction oact;
+- static struct itimerval otimer;
++ static struct __itimerval64 otimer;
+ # define oact_ptr &oact
+ # define otimer_ptr &otimer
+
+@@ -79,7 +80,7 @@ __profil (u_short *sample_buffer, size_t
+ /* Wasn't turned on. */
+ return 0;
+
+- if (__setitimer (ITIMER_PROF, &otimer, NULL) < 0)
++ if (__setitimer64 (ITIMER_PROF, &otimer, NULL) < 0)
+ return -1;
+ samples = NULL;
+ return __sigaction (SIGPROF, &oact, NULL);
+@@ -89,7 +90,7 @@ __profil (u_short *sample_buffer, size_t
+ {
+ /* Was already turned on. Restore old timer and signal handler
+ first. */
+- if (__setitimer (ITIMER_PROF, &otimer, NULL) < 0
++ if (__setitimer64 (ITIMER_PROF, &otimer, NULL) < 0
+ || __sigaction (SIGPROF, &oact, NULL) < 0)
+ return -1;
+ }
+@@ -120,7 +121,7 @@ __profil (u_short *sample_buffer, size_t
+ timer.it_value.tv_sec = 0;
+ timer.it_value.tv_usec = 1000000 / __profile_frequency ();
+ timer.it_interval = timer.it_value;
+- return __setitimer (ITIMER_PROF, &timer, otimer_ptr);
++ return __setitimer64 (ITIMER_PROF, &timer, otimer_ptr);
+ }
+ weak_alias (__profil, profil)
+
+--- glibc-2.31.orig/sysdeps/posix/sleep.c
++++ glibc-2.31/sysdeps/posix/sleep.c
+@@ -21,7 +21,6 @@
+ #include <errno.h>
+ #include <sys/param.h>
+
+-
+ /* Make the process sleep for SECONDS seconds, or until a signal arrives
+ and is not ignored. The function returns the number of seconds less
+ than SECONDS which it actually slept (zero if it slept the full time).
+@@ -36,7 +35,7 @@ __sleep (unsigned int seconds)
+
+ const unsigned int max
+ = (unsigned int) (((unsigned long int) (~((time_t) 0))) >> 1);
+- struct timespec ts = { 0, 0 };
++ struct __timespec64 ts = { 0, 0 };
+ do
+ {
+ if (sizeof (ts.tv_sec) <= sizeof (seconds))
+@@ -48,11 +47,11 @@ __sleep (unsigned int seconds)
+ }
+ else
+ {
+- ts.tv_sec = (time_t) seconds;
++ ts.tv_sec = (__time64_t) seconds;
+ seconds = 0;
+ }
+
+- if (__nanosleep (&ts, &ts) < 0)
++ if (__clock_nanosleep_time64 (CLOCK_REALTIME, 0, &ts, &ts) < 0)
+ /* We were interrupted.
+ Return the number of (whole) seconds we have not yet slept. */
+ return seconds + ts.tv_sec;
+--- glibc-2.31.orig/sysdeps/posix/sprofil.c
++++ glibc-2.31/sysdeps/posix/sprofil.c
+@@ -23,6 +23,7 @@
+ #include <unistd.h>
+ #include <sigsetops.h>
+
++#include <time.h>
+ #include <sys/time.h>
+ #include <sys/profil.h>
+
+@@ -53,7 +54,7 @@ struct prof_info
+ unsigned int num_regions;
+ struct region *region;
+ struct region *last, *overflow;
+- struct itimerval saved_timer;
++ struct __itimerval64 saved_timer;
+ struct sigaction saved_action;
+ };
+
+@@ -283,7 +284,7 @@ __sprofil (struct prof *profp, int profc
+ unsigned int flags)
+ {
+ struct prof *p[profcnt];
+- struct itimerval timer;
++ struct __itimerval64 timer;
+ struct sigaction act;
+ int i;
+
+@@ -298,7 +299,7 @@ __sprofil (struct prof *profp, int profc
+ if (prof_info.num_regions > 0)
+ {
+ /* Disable profiling. */
+- if (__setitimer (ITIMER_PROF, &prof_info.saved_timer, NULL) < 0)
++ if (__setitimer64 (ITIMER_PROF, &prof_info.saved_timer, NULL) < 0)
+ return -1;
+
+ if (__sigaction (SIGPROF, &prof_info.saved_action, NULL) < 0)
+@@ -354,7 +355,7 @@ __sprofil (struct prof *profp, int profc
+ timer.it_value.tv_sec = 0;
+ timer.it_value.tv_usec = 1;
+ timer.it_interval = timer.it_value;
+- return __setitimer (ITIMER_PROF, &timer, &prof_info.saved_timer);
++ return __setitimer64 (ITIMER_PROF, &timer, &prof_info.saved_timer);
+ }
+
+ weak_alias (__sprofil, sprofil)
+--- glibc-2.31.orig/sysdeps/posix/usleep.c
++++ glibc-2.31/sysdeps/posix/usleep.c
+@@ -23,11 +23,11 @@
+ int
+ usleep (useconds_t useconds)
+ {
+- struct timespec ts = { .tv_sec = (long int) (useconds / 1000000),
++ struct __timespec64 ts = { .tv_sec = (long long int) (useconds / 1000000),
+ .tv_nsec = (long int) (useconds % 1000000) * 1000ul };
+
+ /* Note the usleep() is a cancellation point. But since we call
+ nanosleep() which itself is a cancellation point we do not have
+ to do anything here. */
+- return __nanosleep (&ts, NULL);
++ return __clock_nanosleep_time64 (CLOCK_REALTIME, 0, &ts, NULL);
+ }
+--- glibc-2.31.orig/sysdeps/pthread/cnd_timedwait.c
++++ glibc-2.31/sysdeps/pthread/cnd_timedwait.c
+@@ -20,7 +20,7 @@
+
+ int
+ cnd_timedwait (cnd_t *restrict cond, mtx_t *restrict mutex,
+- const struct timespec* restrict time_point)
++ const struct __timespec64* restrict time_point)
+ {
+ int err_code = __pthread_cond_timedwait ((pthread_cond_t *) cond,
+ (pthread_mutex_t *) mutex,
+--- glibc-2.31.orig/sysdeps/pthread/mtx_timedlock.c
++++ glibc-2.31/sysdeps/pthread/mtx_timedlock.c
+@@ -20,7 +20,7 @@
+
+ int
+ mtx_timedlock (mtx_t *restrict mutex,
+- const struct timespec *restrict time_point)
++ const struct __timespec64 *restrict time_point)
+ {
+ int err_code = __pthread_mutex_timedlock ((pthread_mutex_t *)mutex,
+ time_point);
+--- glibc-2.31.orig/sysdeps/pthread/semaphore.h
++++ glibc-2.31/sysdeps/pthread/semaphore.h
+@@ -20,6 +20,7 @@
+
+ #include <features.h>
+ #include <sys/types.h>
++#include <time.h>
+ #ifdef __USE_XOPEN2K
+ # include <bits/types/struct_timespec.h>
+ #endif
+@@ -60,14 +61,14 @@ extern int sem_wait (sem_t *__sem) __non
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+ extern int sem_timedwait (sem_t *__restrict __sem,
+- const struct timespec *__restrict __abstime)
++ const struct __timespec64 *__restrict __abstime)
+ __nonnull ((1, 2));
+ #endif
+
+ #ifdef __USE_GNU
+ extern int sem_clockwait (sem_t *__restrict __sem,
+ clockid_t clock,
+- const struct timespec *__restrict __abstime)
++ const struct __timespec64 *__restrict __abstime)
+ __nonnull ((1, 3));
+ #endif
+
+--- glibc-2.31.orig/sysdeps/pthread/thrd_sleep.c
++++ glibc-2.31/sysdeps/pthread/thrd_sleep.c
+@@ -22,9 +22,9 @@
+ #include "thrd_priv.h"
+
+ int
+-thrd_sleep (const struct timespec* time_point, struct timespec* remaining)
++thrd_sleep (const struct __timespec64* time_point, struct __timespec64* remaining)
+ {
+- int ret = __clock_nanosleep (CLOCK_REALTIME, 0, time_point, remaining);
++ int ret = __clock_nanosleep_time64 (CLOCK_REALTIME, 0, time_point, remaining);
+ /* C11 states thrd_sleep function returns -1 if it has been interrupted
+ by a signal, or a negative value if it fails. */
+ switch (ret)
+--- glibc-2.31.orig/sysdeps/pthread/threads.h
++++ glibc-2.31/sysdeps/pthread/threads.h
+@@ -88,8 +88,8 @@ extern thrd_t thrd_current (void);
+ __TIME_POINT. The current thread may resume if receives a signal. In
+ that case, if __REMAINING is not NULL, the remaining time is stored in
+ the object pointed by it. */
+-extern int thrd_sleep (const struct timespec *__time_point,
+- struct timespec *__remaining);
++extern int thrd_sleep (const struct __timespec64 *__time_point,
++ struct __timespec64 *__remaining);
+
+ /* Terminate current thread execution, cleaning up any thread local
+ storage and freeing resources. Returns the value specified in __RES. */
+@@ -132,7 +132,7 @@ extern int mtx_lock (mtx_t *__mutex);
+ or time pointed by __TIME_POINT is reached. In case the mutex is unlock,
+ the current thread will not be blocked. */
+ extern int mtx_timedlock (mtx_t *__restrict __mutex,
+- const struct timespec *__restrict __time_point);
++ const struct __timespec64 *__restrict __time_point);
+
+ /* Try to lock the mutex pointed by __MUTEX without blocking. If the mutex
+ is free the current threads takes control of it, otherwise it returns
+@@ -173,7 +173,7 @@ extern int cnd_wait (cnd_t *__cond, mtx_
+ reached. */
+ extern int cnd_timedwait (cnd_t *__restrict __cond,
+ mtx_t *__restrict __mutex,
+- const struct timespec *__restrict __time_point);
++ const struct __timespec64 *__restrict __time_point);
+
+ /* Destroy condition variable pointed by __cond and free all of its
+ resources. */
+--- glibc-2.31.orig/sysdeps/unix/bsd/ualarm.c
++++ glibc-2.31/sysdeps/unix/bsd/ualarm.c
+@@ -17,6 +17,7 @@
+
+ #include <sys/time.h>
+ #include <unistd.h>
++#include <time.h>
+
+ /* Set an alarm to go off (generating a SIGALRM signal) in VALUE microseconds.
+ If INTERVAL is nonzero, when the alarm goes off, the timer is reset to go
+@@ -26,14 +27,14 @@
+ useconds_t
+ ualarm (useconds_t value, useconds_t interval)
+ {
+- struct itimerval timer, otimer;
++ struct __itimerval64 timer, otimer;
+
+ timer.it_value.tv_sec = 0;
+ timer.it_value.tv_usec = value;
+ timer.it_interval.tv_sec = 0;
+ timer.it_interval.tv_usec = interval;
+
+- if (__setitimer (ITIMER_REAL, &timer, &otimer) < 0)
++ if (__setitimer64 (ITIMER_REAL, &timer, &otimer) < 0)
+ return -1;
+
+ return (otimer.it_value.tv_sec * 1000000) + otimer.it_value.tv_usec;
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/clock.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/clock.c
+@@ -23,7 +23,7 @@
+ clock_t
+ clock (void)
+ {
+- struct timespec ts;
++ struct __timespec64 ts;
+
+ _Static_assert (CLOCKS_PER_SEC == 1000000,
+ "CLOCKS_PER_SEC should be 1000000");
+@@ -31,7 +31,7 @@ clock (void)
+ /* clock_gettime shouldn't fail here since CLOCK_PROCESS_CPUTIME_ID is
+ supported since 2.6.12. Check the return value anyway in case the kernel
+ barfs on us for some reason. */
+- if (__glibc_unlikely (__clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &ts) != 0))
++ if (__glibc_unlikely (__clock_gettime64 (CLOCK_PROCESS_CPUTIME_ID, &ts) != 0))
+ return (clock_t) -1;
+
+ return (ts.tv_sec * CLOCKS_PER_SEC
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/clock_getres.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/clock_getres.c
+@@ -86,10 +86,13 @@ __clock_getres (clockid_t clock_id, stru
+ }
+ #endif
+
++#if __TIMESIZE == 64
+ versioned_symbol (libc, __clock_getres, clock_getres, GLIBC_2_17);
++
+ /* clock_getres moved to libc in version 2.17;
+ old binaries may expect the symbol version it had in librt. */
+ #if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
+ strong_alias (__clock_getres, __clock_getres_2);
+ compat_symbol (libc, __clock_getres_2, clock_getres, GLIBC_2_2);
+ #endif
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/clock_gettime.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/clock_gettime.c
+@@ -95,6 +95,7 @@ __clock_gettime (clockid_t clock_id, str
+ return ret;
+ }
+ #endif
++#if __TIMESIZE == 64
+ libc_hidden_def (__clock_gettime)
+
+ versioned_symbol (libc, __clock_gettime, clock_gettime, GLIBC_2_17);
+@@ -104,3 +105,4 @@ versioned_symbol (libc, __clock_gettime,
+ strong_alias (__clock_gettime, __clock_gettime_2);
+ compat_symbol (libc, __clock_gettime_2, clock_gettime, GLIBC_2_2);
+ #endif
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/clock_nanosleep.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/clock_nanosleep.c
+@@ -95,6 +95,7 @@ __clock_nanosleep (clockid_t clock_id, i
+ return r;
+ }
+ #endif
++#if __TIMESIZE == 64
+ libc_hidden_def (__clock_nanosleep)
+ versioned_symbol (libc, __clock_nanosleep, clock_nanosleep, GLIBC_2_17);
+ /* clock_nanosleep moved to libc in version 2.17;
+@@ -103,3 +104,4 @@ versioned_symbol (libc, __clock_nanoslee
+ strong_alias (__clock_nanosleep, __clock_nanosleep_2);
+ compat_symbol (libc, __clock_nanosleep_2, clock_nanosleep, GLIBC_2_2);
+ #endif
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/clock_settime.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/clock_settime.c
+@@ -64,6 +64,7 @@ __clock_settime (clockid_t clock_id, con
+ }
+ #endif
+
++#if __TIMESIZE == 64
+ libc_hidden_def (__clock_settime)
+
+ versioned_symbol (libc, __clock_settime, clock_settime, GLIBC_2_17);
+@@ -73,3 +74,4 @@ versioned_symbol (libc, __clock_settime,
+ strong_alias (__clock_settime, __clock_settime_2);
+ compat_symbol (libc, __clock_settime_2, clock_settime, GLIBC_2_2);
+ #endif
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/futimens.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/futimens.c
+@@ -51,4 +51,6 @@ __futimens (int fd, const struct timespe
+ return __futimens64 (fd, tsp ? &tsp64[0] : NULL);
+ }
+ #endif
++#if __TIMESIZE == 64
+ weak_alias (__futimens, futimens)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/futimes.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/futimes.c
+@@ -51,4 +51,6 @@ __futimes (int fd, const struct timeval
+ return __futimes64 (fd, tvp ? &tv64[0] : NULL);
+ }
+ #endif
++#if __TIMESIZE == 64
+ weak_alias (__futimes, futimes)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/futimesat.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/futimesat.c
+@@ -50,4 +50,6 @@ __futimesat (int fd, const char *file, c
+ return __futimesat64 (fd, file, tvp ? &tv64[0] : NULL);
+ }
+ #endif
++#if __TIMESIZE == 64
+ weak_alias (__futimesat, futimesat)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/getitimer.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/getitimer.c
+@@ -55,4 +55,6 @@ __getitimer (__itimer_which_t which, str
+ return __getitimer64 (which, &val64);
+ }
+ #endif
++#if __TIMESIZE == 64
+ weak_alias (__getitimer, getitimer)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/getrusage.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/getrusage.c
+@@ -54,4 +54,6 @@ __getrusage (enum __rusage_who who, stru
+ return ret;
+ }
+ #endif
++#if __TIMESIZE == 64
+ weak_alias (__getrusage, getrusage)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/gettimeofday.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/gettimeofday.c
+@@ -91,5 +91,7 @@ __gettimeofday (struct timeval *restrict
+ return 0;
+ }
+ # endif
++#if __TIMESIZE == 64
+ weak_alias (__gettimeofday, gettimeofday)
+ #endif
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/lutimes.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/lutimes.c
+@@ -51,4 +51,6 @@ __lutimes (const char *file, const struc
+ return __lutimes64 (file, tvp ? &tv64[0] : NULL);
+ }
+ #endif
++#if __TIMESIZE == 64
+ weak_alias (__lutimes, lutimes)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/mq_timedreceive.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/mq_timedreceive.c
+@@ -71,6 +71,8 @@ __mq_timedreceive (mqd_t mqdes, char *__
+ }
+ #endif
+
++#if __TIMESIZE == 64
+ hidden_def (__mq_timedreceive)
+ weak_alias (__mq_timedreceive, mq_timedreceive)
+ hidden_weak (mq_timedreceive)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/mq_timedsend.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/mq_timedsend.c
+@@ -70,6 +70,8 @@ __mq_timedsend (mqd_t mqdes, const char
+ }
+ #endif
+
++#if __TIMESIZE == 64
+ hidden_def (__mq_timedsend)
+ weak_alias (__mq_timedsend, mq_timedsend)
+ hidden_weak (mq_timedsend)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/ppoll.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/ppoll.c
+@@ -78,5 +78,7 @@ __ppoll (struct pollfd *fds, nfds_t nfds
+ return __ppoll64 (fds, nfds, timeout ? &ts64 : NULL, sigmask);
+ }
+ #endif
++#if __TIMESIZE == 64
+ strong_alias (__ppoll, ppoll)
+ libc_hidden_def (ppoll)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/sched_rr_gi.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/sched_rr_gi.c
+@@ -69,4 +69,6 @@ __sched_rr_get_interval (pid_t pid, stru
+ return ret;
+ }
+ #endif
++#if __TIMESIZE == 64
+ strong_alias (__sched_rr_get_interval, sched_rr_get_interval)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/setitimer.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/setitimer.c
+@@ -91,4 +91,6 @@ __setitimer (__itimer_which_t which,
+ return ret;
+ }
+ #endif
++#if __TIMESIZE == 64
+ weak_alias (__setitimer, setitimer)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/settimeofday.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/settimeofday.c
+@@ -49,4 +49,6 @@ __settimeofday (const struct timeval *tv
+ return __settimeofday64 (&tv64, tz);
+ }
+ #endif
++#if __TIMESIZE == 64
+ weak_alias (__settimeofday, settimeofday);
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/timer_gettime.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/timer_gettime.c
+@@ -67,4 +67,6 @@ __timer_gettime (timer_t timerid, struct
+ return retval;
+ }
+ #endif
++#if __TIMESIZE == 64
+ weak_alias (__timer_gettime, timer_gettime)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/timer_settime.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/timer_settime.c
+@@ -89,4 +89,6 @@ __timer_settime (timer_t timerid, int fl
+ return retval;
+ }
+ #endif
++#if __TIMESIZE == 64
+ weak_alias (__timer_settime, timer_settime)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/timerfd_gettime.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/timerfd_gettime.c
+@@ -64,4 +64,6 @@ __timerfd_gettime (int fd, struct itimer
+ return retval;
+ }
+ #endif
++#if __TIMESIZE == 64
+ strong_alias (__timerfd_gettime, timerfd_gettime)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/timerfd_settime.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/timerfd_settime.c
+@@ -83,4 +83,6 @@ __timerfd_settime (int fd, int flags, co
+ return retval;
+ }
+ #endif
++#if __TIMESIZE == 64
+ strong_alias (__timerfd_settime, timerfd_settime)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/timespec_get.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/timespec_get.c
+@@ -55,4 +55,6 @@ __timespec_get (struct timespec *ts, int
+ return ret;
+ }
+ #endif
++#if __TIMESIZE == 64
+ strong_alias (__timespec_get, timespec_get);
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/utime.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/utime.c
+@@ -51,5 +51,7 @@ __utime (const char *file, const struct
+ return __utime64 (file, times ? &utb64 : NULL);
+ }
+ #endif
++#if __TIMESIZE == 64
+ strong_alias (__utime, utime)
+ libc_hidden_def (utime)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/utimensat.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/utimensat.c
+@@ -90,4 +90,6 @@ __utimensat (int fd, const char *file, c
+ return __utimensat64 (fd, file, tsp ? &tsp64[0] : NULL, flags);
+ }
+ #endif
++#if __TIMESIZE == 64
+ weak_alias (__utimensat, utimensat)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/utimes.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/utimes.c
+@@ -49,4 +49,6 @@ __utimes (const char *file, const struct
+ return __utimes64 (file, tvp ? tv64 : NULL);
+ }
+ #endif
++#if __TIMESIZE == 64
+ weak_alias (__utimes, utimes)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/wait4.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/wait4.c
+@@ -126,5 +126,7 @@ __wait4 (pid_t pid, int *stat_loc, int o
+ return ret;
+ }
+ #endif
++#if __TIMESIZE == 64
+ libc_hidden_def (__wait4);
+ weak_alias (__wait4, wait4)
++#endif
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/x86/elision-timed.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/x86/elision-timed.c
+@@ -20,7 +20,7 @@
+ #include <elision-conf.h>
+ #include "lowlevellock.h"
+ #define __lll_lock_elision __lll_clocklock_elision
+-#define EXTRAARG clockid_t clockid, const struct timespec *t,
++#define EXTRAARG clockid_t clockid, const struct __timespec64 *t,
+ #undef LLL_LOCK
+ #define LLL_LOCK(a, b) lll_clocklock (a, clockid, t, b)
+ #include "elision-lock.c"
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/x86/lowlevellock.h
++++ glibc-2.31/sysdeps/unix/sysv/linux/x86/lowlevellock.h
+@@ -84,7 +84,7 @@ __lll_cas_lock (int *futex)
+
+ extern int __lll_clocklock_elision (int *futex, short *adapt_count,
+ clockid_t clockid,
+- const struct timespec *timeout,
++ const struct __timespec64 *timeout,
+ int private) attribute_hidden;
+
+ #define lll_clocklock_elision(futex, adapt_count, clockid, timeout, private) \
+--- glibc-2.31.orig/time/clock_getres.c
++++ glibc-2.31/time/clock_getres.c
+@@ -36,4 +36,6 @@ strong_alias (__clock_getres, __clock_ge
+ compat_symbol (libc, __clock_getres_2, clock_getres, GLIBC_2_2);
+ #endif
+
++#if __TIMESIZE == 64
+ stub_warning (clock_getres)
++#endif
+--- glibc-2.31.orig/time/difftime.c
++++ glibc-2.31/time/difftime.c
+@@ -130,7 +130,8 @@ __difftime (time_t time1, time_t time0)
+ {
+ return __difftime64 (time1, time0);
+ }
+-
+ #endif
+
++#if __TIMESIZE == 64
+ strong_alias (__difftime, difftime)
++#endif
+--- glibc-2.31.orig/time/ftime.c
++++ glibc-2.31/time/ftime.c
+@@ -22,8 +22,8 @@
+ int
+ ftime (struct timeb *timebuf)
+ {
+- struct timespec ts;
+- __clock_gettime (CLOCK_REALTIME, &ts);
++ struct __timespec64 ts;
++ __clock_gettime64 (CLOCK_REALTIME, &ts);
+
+ timebuf->time = ts.tv_sec;
+ timebuf->millitm = ts.tv_nsec / 1000000;
+--- glibc-2.31.orig/time/getdate.c
++++ glibc-2.31/time/getdate.c
+@@ -64,7 +64,7 @@ first_wday (int year, int mon, int wday)
+ tm.tm_year = year;
+ tm.tm_mon = mon;
+ tm.tm_mday = 1;
+- mktime (&tm);
++ __mktime64 (&tm);
+
+ return (1 + (wday - tm.tm_wday + 7) % 7);
+ }
+@@ -112,7 +112,7 @@ __getdate_r (const char *string, struct
+ size_t len;
+ char *datemsk;
+ char *result = NULL;
+- time_t timer;
++ __time64_t timer;
+ struct tm tm;
+ struct stat64 st;
+ int mday_ok = 0;
+@@ -220,7 +220,7 @@ __getdate_r (const char *string, struct
+
+ /* Get current time. */
+ timer = time_now ();
+- __localtime_r (&timer, &tm);
++ __localtime64_r (&timer, &tm);
+
+ /* If only the weekday is given, today is assumed if the given day
+ is equal to the current day and next week if it is less. */
+@@ -285,7 +285,7 @@ __getdate_r (const char *string, struct
+ call normalizes the struct tm. */
+ if ((!mday_ok && !check_mday (TM_YEAR_BASE + tp->tm_year, tp->tm_mon,
+ tp->tm_mday))
+- || mktime (tp) == (time_t) -1)
++ || __mktime64 (tp) == (__time64_t) -1)
+ return 8;
+
+ return 0;
+--- glibc-2.31.orig/time/gmtime.c
++++ glibc-2.31/time/gmtime.c
+@@ -41,8 +41,10 @@ __gmtime_r (const time_t *t, struct tm *
+
+ #endif
+
++#if __TIMESIZE == 64
+ libc_hidden_def (__gmtime_r)
+ weak_alias (__gmtime_r, gmtime_r)
++#endif
+
+ /* Return the `struct tm' representation of *T in UTC. */
+ struct tm *
+--- glibc-2.31.orig/time/localtime.c
++++ glibc-2.31/time/localtime.c
+@@ -44,8 +44,9 @@ libc_hidden_def (__localtime64_r)
+
+ #endif
+
++#if __TIMESIZE == 64
+ weak_alias (__localtime_r, localtime_r)
+-
++#endif
+
+ /* Return the `struct tm' representation of *T in local time. */
+ struct tm *
+--- glibc-2.31.orig/time/mktime.c
++++ glibc-2.31/time/mktime.c
+@@ -561,6 +561,8 @@ mktime (struct tm *tp)
+
+ #endif
+
++#if __TIMESIZE == 64
+ weak_alias (mktime, timelocal)
+ libc_hidden_def (mktime)
+ libc_hidden_weak (timelocal)
++#endif
+--- glibc-2.31.orig/time/stime.c
++++ glibc-2.31/time/stime.c
+@@ -27,11 +27,11 @@ int
+ attribute_compat_text_section
+ __stime (const time_t *when)
+ {
+- struct timespec ts;
++ struct __timespec64 ts;
+ ts.tv_sec = *when;
+ ts.tv_nsec = 0;
+
+- return __clock_settime (CLOCK_REALTIME, &ts);
++ return __clock_settime64 (CLOCK_REALTIME, &ts);
+ }
+
+ compat_symbol (libc, __stime, stime, GLIBC_2_0);
+--- glibc-2.31.orig/time/strftime_l.c
++++ glibc-2.31/time/strftime_l.c
+@@ -1138,10 +1138,10 @@ __strftime_internal (CHAR_T *s, size_t m
+ case L_('s'): /* GNU extension. */
+ {
+ struct tm ltm;
+- time_t t;
++ __time64_t t;
+
+ ltm = *tp;
+- t = mktime (&ltm);
++ t = __mktime64 (&ltm);
+
+ /* Generate string value for T using time_t arithmetic;
+ this works even if sizeof (long) < sizeof (time_t). */
+--- glibc-2.31.orig/time/strptime_l.c
++++ glibc-2.31/time/strptime_l.c
+@@ -663,7 +663,7 @@ __strptime_internal (const char *rp, con
+ the `get_number' macro. Instead read the number
+ character for character and construct the result while
+ doing this. */
+- time_t secs = 0;
++ __time64_t secs = 0;
+ if (*rp < '0' || *rp > '9')
+ /* We need at least one digit. */
+ return NULL;
+@@ -675,7 +675,7 @@ __strptime_internal (const char *rp, con
+ }
+ while (*rp >= '0' && *rp <= '9');
+
+- if (localtime_r (&secs, tm) == NULL)
++ if (__localtime64_r (&secs, tm) == NULL)
+ /* Error in function. */
+ return NULL;
+ }
+--- glibc-2.31.orig/time/time.h
++++ glibc-2.31/time/time.h
+@@ -262,8 +262,9 @@ extern int dysize (int __year) __THROW
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+-extern int nanosleep (const struct timespec *__requested_time,
+- struct timespec *__remaining);
++struct __timespec64;
++extern int nanosleep (const struct __timespec64 *__requested_time,
++ struct __timespec64 *__remaining);
+
+
+ /* Get resolution of clock CLOCK_ID. */
diff --git a/debian/patches/y2038-force.diff b/debian/patches/y2038-force.diff
new file mode 100644
index 00000000..6efdbef1
--- /dev/null
+++ b/debian/patches/y2038-force.diff
@@ -0,0 +1,517 @@
+commit 60e147c762e532345755bd68a3d012ba44db004c
+Author: Arnd Bergmann <arnd@arndb.de>
+Date: Wed Mar 4 15:25:30 2020 +0100
+
+ y2038: force time64 symbols
+
+ Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+
+Index: glibc-2.31-2038/include/features.h
+===================================================================
+--- glibc-2.31-2038.orig/include/features.h
++++ glibc-2.31-2038/include/features.h
+@@ -376,6 +376,15 @@
+ # define __USE_LARGEFILE64 1
+ #endif
+
++
++/* force _FILE_OFFSET_BITS and _TIME_BITS */
++#if !defined _FILE_OFFSET_BITS || _FILE_OFFSET_BITS != 64
++#define _FILE_OFFSET_BITS 64
++#endif
++#if !defined _TIME_BITS || _TIME_BITS != 64
++#define _TIME_BITS 64
++#endif
++
+ #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
+ # define __USE_FILE_OFFSET64 1
+ #endif
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/clock_getres.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/clock_getres.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/clock_getres.c
+@@ -71,7 +71,7 @@ __clock_getres64 (clockid_t clock_id, st
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+ int
+ __clock_getres (clockid_t clock_id, struct timespec *res)
+ {
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/clock_gettime.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/clock_gettime.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/clock_gettime.c
+@@ -72,7 +72,7 @@ __clock_gettime64 (clockid_t clock_id, s
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+ int
+ __clock_gettime (clockid_t clock_id, struct timespec *tp)
+ {
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/clock_nanosleep.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/clock_nanosleep.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/clock_nanosleep.c
+@@ -78,7 +78,7 @@ __clock_nanosleep_time64 (clockid_t cloc
+ ? INTERNAL_SYSCALL_ERRNO (r) : 0);
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+ int
+ __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
+ struct timespec *rem)
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/clock_settime.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/clock_settime.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/clock_settime.c
+@@ -54,7 +54,7 @@ __clock_settime64 (clockid_t clock_id, c
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+ int
+ __clock_settime (clockid_t clock_id, const struct timespec *tp)
+ {
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/futimens.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/futimens.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/futimens.c
+@@ -37,7 +37,7 @@ __futimens64 (int fd, const struct __tim
+ return __utimensat64_helper (fd, NULL, &tsp64[0], 0);
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+ int
+ __futimens (int fd, const struct timespec tsp[2])
+ {
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/futimes.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/futimes.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/futimes.c
+@@ -35,7 +35,7 @@ __futimes64 (int fd, const struct __time
+ return __utimensat64_helper (fd, NULL, tvp64 ? &ts64[0] : NULL, 0);
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ int
+ __futimes (int fd, const struct timeval tvp[2])
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/futimesat.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/futimesat.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/futimesat.c
+@@ -34,7 +34,7 @@ __futimesat64 (int fd, const char *file,
+ return __utimensat64_helper (fd, file, tvp64 ? &ts64[0] : NULL, 0);
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ int
+ __futimesat (int fd, const char *file, const struct timeval tvp[2])
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/getitimer.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/getitimer.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/getitimer.c
+@@ -41,7 +41,7 @@ __getitimer64 (__itimer_which_t which, s
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+ int
+ __getitimer (__itimer_which_t which, struct itimerval *curr_value)
+ {
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/getrusage.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/getrusage.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/getrusage.c
+@@ -37,7 +37,7 @@ __getrusage64 (enum __rusage_who who, st
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+ int
+ __getrusage (enum __rusage_who who, struct rusage *usage)
+ {
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/gettimeofday.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/gettimeofday.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/gettimeofday.c
+@@ -72,7 +72,7 @@ __gettimeofday64 (struct __timeval64 *re
+ return 0;
+ }
+
+-# if __TIMESIZE != 64
++# if __TIMESIZE != __WORDSIZE
+
+ int
+ __gettimeofday (struct timeval *restrict tv, void *restrict tz)
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/kernel-features.h
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/kernel-features.h
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/kernel-features.h
+@@ -178,35 +178,9 @@
+ timerfd_settime(64)
+ utimensat(_time64)
+
+- On architectures where time_t has historically been 64 bits,
+- only the 64-bit version of each system call exists, and there
+- are no suffixes on the __NR_ constants.
+-
+- On architectures where time_t has historically been 32 bits,
+- both 32-bit and 64-bit versions of each system call may exist,
+- depending on the kernel version. When the 64-bit version exists,
+- there is a '64' or '_time64' suffix on the name of its __NR_
+- constant, as shown above.
+-
+- This flag is always set for Linux 5.1 and later. Prior to that
+- version, it is set only for some CPU architectures and ABIs:
+-
+- - __WORDSIZE == 64 - all supported architectures where pointers
+- are 64 bits also have always had 64-bit time_t.
+-
+- - __WORDSIZE == 32 && __SYSCALL_WORDSIZE == 64 - this describes
+- only one supported configuration, x86's 'x32' subarchitecture,
+- where pointers are 32 bits but time_t has always been 64 bits.
+-
+- __ASSUME_TIME64_SYSCALLS being set does not mean __TIMESIZE is 64,
+- and __TIMESIZE equal to 64 does not mean __ASSUME_TIME64_SYSCALLS
+- is set. All four cases are possible. */
+-
+-#if __LINUX_KERNEL_VERSION >= 0x050100 \
+- || __WORDSIZE == 64 \
+- || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64)
++ Assume we are using a new kernel for now
++*/
+ # define __ASSUME_TIME64_SYSCALLS 1
+-#endif
+
+ /* Linux waitid prior kernel 5.4 does not support waiting for the current
+ process group. */
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/lutimes.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/lutimes.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/lutimes.c
+@@ -35,7 +35,7 @@ __lutimes64 (const char *file, const str
+ AT_SYMLINK_NOFOLLOW);
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ int
+ __lutimes (const char *file, const struct timeval tvp[2])
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/mq_timedreceive.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/mq_timedreceive.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/mq_timedreceive.c
+@@ -55,7 +55,7 @@ __mq_timedreceive_time64 (mqd_t mqdes, c
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ ssize_t
+ __mq_timedreceive (mqd_t mqdes, char *__restrict msg_ptr, size_t msg_len,
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/mq_timedsend.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/mq_timedsend.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/mq_timedsend.c
+@@ -55,7 +55,7 @@ __mq_timedsend_time64 (mqd_t mqdes, cons
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ int
+ __mq_timedsend (mqd_t mqdes, const char *msg_ptr, size_t msg_len,
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/ppoll.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/ppoll.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/ppoll.c
+@@ -66,7 +66,7 @@ __ppoll64 (struct pollfd *fds, nfds_t nf
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+ int
+ __ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
+ const sigset_t *sigmask)
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/sched_rr_gi.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/sched_rr_gi.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/sched_rr_gi.c
+@@ -45,7 +45,7 @@ __sched_rr_get_interval64 (pid_t pid, st
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ int
+ __sched_rr_get_interval (pid_t pid, struct timespec *tp)
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/setitimer.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/setitimer.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/setitimer.c
+@@ -64,7 +64,7 @@ __setitimer64 (__itimer_which_t which,
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+ int
+ __setitimer (__itimer_which_t which,
+ const struct itimerval *restrict new_value,
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/settimeofday.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/settimeofday.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/settimeofday.c
+@@ -39,7 +39,7 @@ __settimeofday64 (const struct __timeval
+ return __clock_settime64 (CLOCK_REALTIME, &ts);
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ int
+ __settimeofday (const struct timeval *tv, const struct timezone *tz)
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/timer_gettime.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/timer_gettime.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/timer_gettime.c
+@@ -51,7 +51,7 @@ __timer_gettime64 (timer_t timerid, stru
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ int
+ __timer_gettime (timer_t timerid, struct itimerspec *value)
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/timer_settime.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/timer_settime.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/timer_settime.c
+@@ -67,7 +67,7 @@ __timer_settime64 (timer_t timerid, int
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ int
+ __timer_settime (timer_t timerid, int flags, const struct itimerspec *value,
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/timerfd_gettime.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/timerfd_gettime.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/timerfd_gettime.c
+@@ -48,7 +48,7 @@ __timerfd_gettime64 (int fd, struct __it
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ int
+ __timerfd_gettime (int fd, struct itimerspec *value)
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/timerfd_settime.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/timerfd_settime.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/timerfd_settime.c
+@@ -61,7 +61,7 @@ __timerfd_settime64 (int fd, int flags,
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ int
+ __timerfd_settime (int fd, int flags, const struct itimerspec *value,
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/timespec_get.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/timespec_get.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/timespec_get.c
+@@ -31,7 +31,7 @@ __timespec_get64 (struct __timespec64 *t
+ return 0;
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ int
+ __timespec_get (struct timespec *ts, int base)
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/utime.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/utime.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/utime.c
+@@ -35,7 +35,7 @@ __utime64 (const char *file, const struc
+ return __utimensat64_helper (0, file, times ? ts64 : NULL, 0);
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ int
+ __utime (const char *file, const struct utimbuf *times)
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/utimensat.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/utimensat.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/utimensat.c
+@@ -75,7 +75,7 @@ __utimensat64 (int fd, const char *file,
+ return __utimensat64_helper (fd, file, &tsp64[0], flags);
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+ int
+ __utimensat (int fd, const char *file, const struct timespec tsp[2],
+ int flags)
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/utimes.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/utimes.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/utimes.c
+@@ -33,7 +33,7 @@ __utimes64 (const char *file, const stru
+ return __utimensat64_helper (AT_FDCWD, file, tvp ? ts64 : NULL, 0);
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ int
+ __utimes (const char *file, const struct timeval tvp[2])
+Index: glibc-2.31-2038/sysdeps/unix/sysv/linux/wait4.c
+===================================================================
+--- glibc-2.31-2038.orig/sysdeps/unix/sysv/linux/wait4.c
++++ glibc-2.31-2038/sysdeps/unix/sysv/linux/wait4.c
+@@ -108,7 +108,7 @@ __wait4_time64 (pid_t pid, int *stat_loc
+ #endif
+ }
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ pid_t
+ __wait4 (pid_t pid, int *stat_loc, int options, struct rusage *usage)
+Index: glibc-2.31-2038/time/ctime.c
+===================================================================
+--- glibc-2.31-2038.orig/time/ctime.c
++++ glibc-2.31-2038/time/ctime.c
+@@ -29,7 +29,7 @@ __ctime64 (const __time64_t *t)
+
+ /* Provide a 32-bit variant if needed. */
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ libc_hidden_def (__ctime64)
+
+Index: glibc-2.31-2038/time/ctime_r.c
+===================================================================
+--- glibc-2.31-2038.orig/time/ctime_r.c
++++ glibc-2.31-2038/time/ctime_r.c
+@@ -30,7 +30,7 @@ __ctime64_r (const __time64_t *t, char *
+
+ /* Provide a 32-bit variant if needed. */
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ libc_hidden_def (__ctime64_r)
+
+Index: glibc-2.31-2038/time/difftime.c
+===================================================================
+--- glibc-2.31-2038.orig/time/difftime.c
++++ glibc-2.31-2038/time/difftime.c
+@@ -121,7 +121,7 @@ __difftime64 (__time64_t time1, __time64
+
+ /* Provide a 32-bit wrapper if needed. */
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ libc_hidden_def (__difftime64)
+
+Index: glibc-2.31-2038/time/gmtime.c
+===================================================================
+--- glibc-2.31-2038.orig/time/gmtime.c
++++ glibc-2.31-2038/time/gmtime.c
+@@ -28,7 +28,7 @@ __gmtime64_r (const __time64_t *t, struc
+
+ /* Provide a 32-bit variant if needed. */
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ libc_hidden_def (__gmtime64_r)
+
+@@ -53,7 +53,7 @@ __gmtime64 (const __time64_t *t)
+
+ /* Provide a 32-bit variant if needed. */
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ libc_hidden_def (__gmtime64)
+
+Index: glibc-2.31-2038/time/localtime.c
+===================================================================
+--- glibc-2.31-2038.orig/time/localtime.c
++++ glibc-2.31-2038/time/localtime.c
+@@ -32,7 +32,7 @@ __localtime64_r (const __time64_t *t, st
+
+ /* Provide a 32-bit variant if needed. */
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ struct tm *
+ __localtime_r (const time_t *t, struct tm *tp)
+@@ -57,7 +57,7 @@ libc_hidden_def (__localtime64)
+
+ /* Provide a 32-bit variant if needed. */
+
+-#if __TIMESIZE != 64
++#if __TIMESIZE != __WORDSIZE
+
+ struct tm *
+ localtime (const time_t *t)
+Index: glibc-2.31-2038/time/mktime.c
+===================================================================
+--- glibc-2.31-2038.orig/time/mktime.c
++++ glibc-2.31-2038/time/mktime.c
+@@ -538,7 +538,7 @@ __mktime64 (struct tm *tp)
+ }
+ #endif /* _LIBC || NEED_MKTIME_WORKING || NEED_MKTIME_WINDOWS */
+
+-#if defined _LIBC && __TIMESIZE != 64
++#if defined _LIBC && __TIMESIZE != __WORDSIZE
+
+ libc_hidden_def (__mktime64)
+
+Index: glibc-2.31-2038/time/timegm.c
+===================================================================
+--- glibc-2.31-2038.orig/time/timegm.c
++++ glibc-2.31-2038/time/timegm.c
+@@ -34,7 +34,7 @@ __timegm64 (struct tm *tmp)
+ return __mktime_internal (tmp, __gmtime64_r, &gmtime_offset);
+ }
+
+-#if defined _LIBC && __TIMESIZE != 64
++#if defined _LIBC && __TIMESIZE != __WORDSIZE
+
+ libc_hidden_def (__timegm64)
+