summaryrefslogtreecommitdiff
path: root/tests/m48t59-test.c
diff options
context:
space:
mode:
authorAndreas Färber <andreas.faerber@web.de>2013-01-26 15:27:59 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-01-30 11:18:38 +0100
commita05ddd9216b6c5e9c48eac3433ff6fa4a282fc17 (patch)
tree76efb2953a0985a8a0f6fa399086f7f03d55053e /tests/m48t59-test.c
parent0b0878611c64f027ca5d15ba641f423cc04ead3f (diff)
downloadqemu-a05ddd9216b6c5e9c48eac3433ff6fa4a282fc17.tar.gz
qemu-a05ddd9216b6c5e9c48eac3433ff6fa4a282fc17.tar.bz2
qemu-a05ddd9216b6c5e9c48eac3433ff6fa4a282fc17.zip
tests: Fix {rtc, m48t59}-test build on illumos
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>
Diffstat (limited to 'tests/m48t59-test.c')
-rw-r--r--tests/m48t59-test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/m48t59-test.c b/tests/m48t59-test.c
index d79f55472d..77d69b330d 100644
--- a/tests/m48t59-test.c
+++ b/tests/m48t59-test.c
@@ -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);
}