From a05ddd9216b6c5e9c48eac3433ff6fa4a282fc17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 26 Jan 2013 15:27:59 +0100 Subject: [PATCH] tests: Fix {rtc, m48t59}-test build on illumos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Stefan Hajnoczi --- tests/m48t59-test.c | 2 ++ tests/rtc-test.c | 2 ++ 2 files changed, 4 insertions(+) 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); } diff --git a/tests/rtc-test.c b/tests/rtc-test.c index e7123cafbc..203c0fc363 100644 --- a/tests/rtc-test.c +++ b/tests/rtc-test.c @@ -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); } -- GitLab