diff options
author | Rich Felker <dalias@aerifal.cx> | 2019-07-20 17:23:40 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2019-07-20 17:23:40 -0400 |
commit | e53a91da582be156487daae39ab675e1fcb1848d (patch) | |
tree | 84a0ccd4fd7ae9c47a4cc68a8a5c6dca10af384c | |
parent | 107d68ad1737929a3e815bd28514cb56e4bedd57 (diff) | |
download | musl-e53a91da582be156487daae39ab675e1fcb1848d.tar.gz musl-e53a91da582be156487daae39ab675e1fcb1848d.tar.bz2 musl-e53a91da582be156487daae39ab675e1fcb1848d.tar.xz musl-e53a91da582be156487daae39ab675e1fcb1848d.zip |
refactor adjtime function using adjtimex function instead of syscall
this removes the assumption that userspace struct timex matches the
syscall type and sets the stage for 64-bit time_t on 32-bit archs.
-rw-r--r-- | src/linux/adjtime.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linux/adjtime.c b/src/linux/adjtime.c index fa8af9f0..5a707f2f 100644 --- a/src/linux/adjtime.c +++ b/src/linux/adjtime.c @@ -15,7 +15,7 @@ int adjtime(const struct timeval *in, struct timeval *out) tx.offset = in->tv_sec*1000000 + in->tv_usec; tx.modes = ADJ_OFFSET_SINGLESHOT; } - if (syscall(SYS_adjtimex, &tx) < 0) return -1; + if (adjtimex(&tx) < 0) return -1; if (out) { out->tv_sec = tx.offset / 1000000; if ((out->tv_usec = tx.offset % 1000000) < 0) { |