summaryrefslogtreecommitdiff
path: root/i386/i386at/model_dep.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-09 22:01:33 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-09 22:01:33 +0100
commit970e7cd16afb136b256479e2ca0723d74e8bb6e1 (patch)
tree3ae63b7b56f911c0b8a1046b60b128b3dcead012 /i386/i386at/model_dep.c
parent28b53508aa4cd06933fa1bcbbaa791ad12ecbf51 (diff)
Set readtodc parameter 64bitv1.8+git20200309
In order to fix year 2038 limit. * i386/i386at/rtc.h (readtodc): Make tp parameter uint64_t *. * i386/i386at/rtc.c (readtodc): Likewise. * xen/time.c (readtodc): Likewise. * i386/i386at/model_dep.c (inittodr): Pass uint64_t pointer to readtodc.
Diffstat (limited to 'i386/i386at/model_dep.c')
-rw-r--r--i386/i386at/model_dep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index 04660a6d..61ed4748 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -669,12 +669,12 @@ void
inittodr(void)
{
time_value_t new_time;
+ uint64_t newsecs;
- new_time.seconds = 0;
+ (void) readtodc(&newsecs);
+ new_time.seconds = newsecs;
new_time.microseconds = 0;
- (void) readtodc((u_int *)&new_time.seconds);
-
{
spl_t s = splhigh();
time = new_time;