summaryrefslogtreecommitdiff
path: root/i386
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
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')
-rw-r--r--i386/i386at/model_dep.c6
-rw-r--r--i386/i386at/rtc.c2
-rw-r--r--i386/i386at/rtc.h2
3 files changed, 5 insertions, 5 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;
diff --git a/i386/i386at/rtc.c b/i386/i386at/rtc.c
index 6e5cdeb3..4187cbf5 100644
--- a/i386/i386at/rtc.c
+++ b/i386/i386at/rtc.c
@@ -146,7 +146,7 @@ dectohexdec(int n)
}
int
-readtodc(u_int *tp)
+readtodc(uint64_t *tp)
{
struct rtc_st rtclk;
time_t n;
diff --git a/i386/i386at/rtc.h b/i386/i386at/rtc.h
index 97eabe95..53797221 100644
--- a/i386/i386at/rtc.h
+++ b/i386/i386at/rtc.h
@@ -137,7 +137,7 @@ struct rtc_st {
} \
}
-extern int readtodc(u_int *tp);
+extern int readtodc(uint64_t *tp);
extern int writetodc(void);
#endif /* _RTC_H_ */