summaryrefslogtreecommitdiff
path: root/sys/arch/arm64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-05-11 13:25:33 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-05-11 13:25:33 +0000
commit9cc9b6c9fc74e84fce54850e733a006d2a3f7fac (patch)
tree964a908fc97ba836fffad4d5f761204b8edec663 /sys/arch/arm64
parent9399ec50b1f957646361c80b209ee79b3b150b7d (diff)
Initialize the timeval passed to todr_gettime() with the base time from
the file system such that implementations can use it to guess the right century. ok mpi@
Diffstat (limited to 'sys/arch/arm64')
-rw-r--r--sys/arch/arm64/arm64/machdep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/arm64/arm64/machdep.c b/sys/arch/arm64/arm64/machdep.c
index ae5ac208bfa..ac532669171 100644
--- a/sys/arch/arm64/arm64/machdep.c
+++ b/sys/arch/arm64/arm64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.46 2020/04/27 13:01:23 kettenis Exp $ */
+/* $OpenBSD: machdep.c,v 1.47 2020/05/11 13:25:32 kettenis Exp $ */
/*
* Copyright (c) 2014 Patrick Wildt <patrick@blueri.se>
*
@@ -1264,6 +1264,9 @@ inittodr(time_t base)
} else
badbase = 0;
+ rtctime.tv_sec = base;
+ rtctime.tv_usec = 0;
+
if (todr_handle == NULL ||
todr_gettime(todr_handle, &rtctime) != 0 ||
rtctime.tv_sec < (MINYEAR - 1970) * SECYR) {