From 0bcd0c5100f5268b04b7b4dbbea63eb2c50e9132 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Tue, 11 Feb 2020 13:16:14 -0800 Subject: sysv/alpha: Use generic __timeval32 and helpers Now there is a generic __timeval32 and helpers we can use them for Alpha instead of the Alpha specific ones. Reviewed-by: Lukasz Majewski Reviewed-by: Adhemerval Zanella --- sysdeps/unix/sysv/linux/alpha/osf_adjtime.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'sysdeps/unix/sysv/linux/alpha/osf_adjtime.c') diff --git a/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c b/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c index f0a1123639..95d646452e 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c @@ -20,9 +20,10 @@ #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) +#include #include #include -#include +#include struct timex32 { unsigned int modes; /* mode selector */ @@ -36,7 +37,7 @@ struct timex32 { long tolerance; /* clock frequency tolerance (ppm) * (read only) */ - struct timeval32 time; /* (read only) */ + struct __timeval32 time; /* (read only) */ long tick; /* (modified) usecs between clock ticks */ long ppsfreq; /* pps frequency (scaled ppm) (ro) */ @@ -55,15 +56,15 @@ struct timex32 { int attribute_compat_text_section -__adjtime_tv32 (const struct timeval32 *itv, struct timeval32 *otv) +__adjtime_tv32 (const struct __timeval32 *itv, struct __timeval32 *otv) { - struct timeval itv64 = alpha_valid_timeval32_to_timeval (*itv); + struct timeval itv64 = valid_timeval32_to_timeval (*itv); struct timeval otv64; if (__adjtime (&itv64, &otv64) == -1) return -1; - *otv = alpha_valid_timeval_to_timeval32 (otv64); + *otv = valid_timeval_to_timeval32 (otv64); return 0; } @@ -91,7 +92,7 @@ __adjtimex_tv32 (struct timex32 *tx) tx64.calcnt = tx->calcnt; tx64.errcnt = tx->errcnt; tx64.stbcnt = tx->stbcnt; - tx64.time = alpha_valid_timeval32_to_timeval (tx->time); + tx64.time = valid_timeval32_to_timeval (tx->time); int status = __adjtimex (&tx64); if (status < 0) @@ -116,7 +117,7 @@ __adjtimex_tv32 (struct timex32 *tx) tx->calcnt = tx64.calcnt; tx->errcnt = tx64.errcnt; tx->stbcnt = tx64.stbcnt; - tx->time = alpha_valid_timeval_to_timeval32 (tx64.time); + tx->time = valid_timeval_to_timeval32 (tx64.time); return status; } -- cgit 1.4.1