Skip to contentSkip to conversation

qemu-system-ppc fix

Qemu-devel Ronald 1 participant 1 message Jan 18, 2005

lore
Share & tools
lore

Ronald

author
#0 lore raw

Hi,

This correct the build for windows which don't handle pre-1970 date correctly.
With a lot of help from Jocelyn Mayer.

m48t59.c 2005-01-18 23:49:11.000041668 +0100 renamed from m48t59.c.old 2005-01-19 00:22:17.584979798 +0100 +5 -0
@@ -80,6 +80,11 @@
 static void set_time (m48t59_t *NVRAM, struct tm *tm)
 {
     time_t now, new_time;
+
+#ifdef _WIN32
+    if(tm->tm_year < 70)
+               tm->tm_year = 70;
+#endif
 
     new_time = mktime(tm);
     now = time(NULL);

Same thing in m48t08.c file

m48t08.c 2005-01-19 00:25:01.224204587 +0100 renamed from m48t08.c.old 2005-01-19 00:23:53.766894517 +0100 +5 -0
@@ -71,6 +71,11 @@
 static void set_time (m48t08_t *NVRAM, struct tm *tm)
 {
     time_t now, new_time;
+
+#ifdef _WIN32
+    if(tm->tm_year < 70)
+        tm->tm_year = 70;
+#endif
 
     new_time = mktime(tm);
     now = time(NULL);