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>
__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;
}
#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);
timeouts and vice versa. */
struct deadline_current_time
{
- struct timespec current;
+ struct __timespec64 current;
};
/* Return the current time. Terminates the process if the current
/* Computed absolute deadline. */
struct deadline
{
- struct timespec absolute;
+ struct __timespec64 absolute;
};