aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-05-20 13:22:36 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-05-20 13:22:36 +0000
commitd157e205e94931f5870b1b3bf2b1f149a87c5aa7 (patch)
tree88e5185d963781383cae068010f7a746f28d0fc4 /hw
parent5f21aef2b0e53b9c179d36cba6004df785500ac1 (diff)
win32 fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@833 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/m48t59.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/hw/m48t59.c b/hw/m48t59.c
index 62cd301e50..9f0a128d59 100644
--- a/hw/m48t59.c
+++ b/hw/m48t59.c
@@ -68,7 +68,11 @@ static void get_time (m48t59_t *NVRAM, struct tm *tm)
time_t t;
t = time(NULL) + NVRAM->time_offset;
- localtime_r(&t, tm);
+#ifdef _WIN32
+ memcpy(tm,localtime(&t),sizeof(*tm));
+#else
+ localtime_r (&t, tm) ;
+#endif
}
static void set_time (m48t59_t *NVRAM, struct tm *tm)
@@ -130,7 +134,11 @@ static void alarm_cb (void *opaque)
static void get_alarm (m48t59_t *NVRAM, struct tm *tm)
{
- localtime_r(&NVRAM->alarm, tm);
+#ifdef _WIN32
+ memcpy(tm,localtime(&NVRAM->alarm),sizeof(*tm));
+#else
+ localtime_r (&NVRAM->alarm, tm);
+#endif
}
static void set_alarm (m48t59_t *NVRAM, struct tm *tm)