diff options
author | Lukasz Majewski <lukma@denx.de> | 2020-03-16 10:09:13 +0100 |
---|---|---|
committer | Lukasz Majewski <lukma@denx.de> | 2020-05-05 18:45:14 +0200 |
commit | e008836c4afeeb81abe548b898fdf2db7d70eaff (patch) | |
tree | 62f27ff4a3283ff6d7cf8485e8884188997fb690 /inet/net-internal.h | |
parent | 1959ed4b9e9f95c991abdf31b24fb8cdf98475e2 (diff) | |
download | glibc-e008836c4afeeb81abe548b898fdf2db7d70eaff.tar.gz glibc-e008836c4afeeb81abe548b898fdf2db7d70eaff.tar.xz glibc-e008836c4afeeb81abe548b898fdf2db7d70eaff.zip |
y2038: inet: Convert inet deadline to support 64 bit time
This change brings 64 bit time support to inet deadline related code for architectures with __WORDSIZE == 32 && __TIMESIZE != 64. It is also safe to replace struct timespec with struct __timespec64 in deadline related structures as: - The __deadline_to_ms () returns the number of miliseconds to deadline to be used with __poll (and hence it is a relative value). - To calculate the deadline from timeval (which will be converted latter) the uintmax_t type is used (unsinged long long int). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'inet/net-internal.h')
-rw-r--r-- | inet/net-internal.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/inet/net-internal.h b/inet/net-internal.h index 3ca301a9be..50c7e1c482 100644 --- a/inet/net-internal.h +++ b/inet/net-internal.h @@ -24,6 +24,7 @@ #include <stdint.h> #include <sys/time.h> #include <libc-diag.h> +#include <struct___timespec64.h> int __inet6_scopeid_pton (const struct in6_addr *address, const char *scope, uint32_t *result); @@ -76,7 +77,7 @@ enum idna_name_classification __idna_name_classify (const char *name) 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_current_time (void) attribute_hidden; /* Computed absolute deadline. */ struct deadline { - struct timespec absolute; + struct __timespec64 absolute; }; |