summaryrefslogtreecommitdiff
path: root/sys/arch/arm
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/arm
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/arm')
-rw-r--r--sys/arch/arm/arm/arm32_machdep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/arm/arm/arm32_machdep.c b/sys/arch/arm/arm/arm32_machdep.c
index 750986e0219..49001219da2 100644
--- a/sys/arch/arm/arm/arm32_machdep.c
+++ b/sys/arch/arm/arm/arm32_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arm32_machdep.c,v 1.57 2020/04/27 13:02:50 kettenis Exp $ */
+/* $OpenBSD: arm32_machdep.c,v 1.58 2020/05/11 13:25:31 kettenis Exp $ */
/* $NetBSD: arm32_machdep.c,v 1.42 2003/12/30 12:33:15 pk Exp $ */
/*
@@ -365,6 +365,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) {