]> git.proxmox.com Git - qemu.git/commitdiff
tests: Fix {rtc, m48t59}-test build on illumos
authorAndreas Färber <andreas.faerber@web.de>
Sat, 26 Jan 2013 14:27:59 +0000 (15:27 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 30 Jan 2013 10:18:38 +0000 (11:18 +0100)
Struct tm does not have tm_gmtoff field on illumos.
Fix the build by not zero-initializing these fields on Solaris.

Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/m48t59-test.c
tests/rtc-test.c

index d79f55472dda724c3a099d1b7f794beff4a25032..77d69b330dde449188020236ed5fa8bb5ee85cd9 100644 (file)
@@ -142,7 +142,9 @@ static void cmos_get_date_time(struct tm *date)
     date->tm_mday = mday;
     date->tm_mon = mon - 1;
     date->tm_year = base_year + year - 1900;
+#ifndef __sun__
     date->tm_gmtoff = 0;
+#endif
 
     ts = mktime(date);
 }
index e7123cafbc8f3910e4acae9d68d701ba60f24566..203c0fc363bb9466d67c5b591e62dc27889984b3 100644 (file)
@@ -115,7 +115,9 @@ static void cmos_get_date_time(struct tm *date)
     date->tm_mday = mday;
     date->tm_mon = mon - 1;
     date->tm_year = base_year + year - 1900;
+#ifndef __sun__
     date->tm_gmtoff = 0;
+#endif
 
     ts = mktime(date);
 }