diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2020-02-11 13:16:14 -0800 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2020-04-02 09:21:06 -0700 |
commit | 0bcd0c5100f5268b04b7b4dbbea63eb2c50e9132 (patch) | |
tree | 84c04949834c1b2985b16d39f1642083ebb90fb7 /sysdeps/unix/sysv/linux/alpha/osf_adjtime.c | |
parent | 600f00b747ff42eb0aa778536d3ef602e8bcd550 (diff) | |
download | glibc-0bcd0c5100f5268b04b7b4dbbea63eb2c50e9132.tar.gz glibc-0bcd0c5100f5268b04b7b4dbbea63eb2c50e9132.tar.xz glibc-0bcd0c5100f5268b04b7b4dbbea63eb2c50e9132.zip |
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 <lukma@denx.de> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix/sysv/linux/alpha/osf_adjtime.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/osf_adjtime.c | 15 |
1 files changed, 8 insertions, 7 deletions
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 <time.h> #include <sys/time.h> #include <sys/timex.h> -#include <alpha-tv32-compat.h> +#include <string.h> 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; } |