aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLukasz Majewski <lukma@denx.de>2020-11-30 14:33:12 +0100
committerLukasz Majewski <lukma@denx.de>2020-12-04 10:04:38 +0100
commit47f78f36836f480b2b7a2041480be966b3a698e3 (patch)
tree79830b4987a614b18d4a6a188264e94e6d56db6d /include
parent94551be9025b2b848e05fc5a9ada5f34060b4f6f (diff)
downloadglibc-47f78f36836f480b2b7a2041480be966b3a698e3.zip
glibc-47f78f36836f480b2b7a2041480be966b3a698e3.tar.gz
glibc-47f78f36836f480b2b7a2041480be966b3a698e3.tar.bz2
y2038: Convert gai_suspend to support 64 bit time
This change uses (in gai_misc.h): - __futex_abstimed_wait64 (instead of futex_reltimed_wait) - __futex_abstimed_wait_cancellable64 (instead of futex_reltimed_wait_cancellable) from ./sysdeps/nptl/futex-helpers.h The gai_suspend() accepts relative timeout, which then is converted to absolute one. The i686-gnu port (HURD) do not define DONT_NEED_GAI_MISC_COND and as it doesn't (yet) support 64 bit time it uses not converted pthread_cond_timedwait(). The __gai_suspend() is supposed to be run on ports with __TIMESIZE !=64 and __WORDSIZE==32. It internally utilizes __gai_suspend_time64() and hence the conversion from 32 bit struct timespec to 64 bit one is required. For ports supporting 64 bit time the __gai_suspend_time64() will be used either via alias (to __gai_suspend when __TIMESIZE==64) or redirection (when -D_TIME_BITS=64 is passed). Build tests: ./src/scripts/build-many-glibcs.py glibcs Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'include')
-rw-r--r--include/netdb.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/netdb.h b/include/netdb.h
index 49d63c1..645b85d 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -194,6 +194,13 @@ extern int ruserpass (const char *host, const char **aname,
const char **apass);
libc_hidden_proto (ruserpass)
+# if __TIMESIZE == 64
+# define __gai_suspend_time64 __gai_suspend
+# else
+extern int __gai_suspend_time64 (const struct gaicb *const list[], int ent,
+ const struct __timespec64 *timeout);
+libanl_hidden_proto (__gai_suspend_time64)
+# endif
/* The following definition has been removed from the public header
since we don't want people to use them. */