From patchwork Sat Jan 26 14:27:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 215911 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 54EFA2C0096 for ; Sun, 27 Jan 2013 01:28:24 +1100 (EST) Received: from localhost ([::1]:38478 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tz6k1-0001Vm-L8 for incoming@patchwork.ozlabs.org; Sat, 26 Jan 2013 09:28:21 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tz6jt-0001TK-Mq for qemu-devel@nongnu.org; Sat, 26 Jan 2013 09:28:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tz6js-0002wO-FH for qemu-devel@nongnu.org; Sat, 26 Jan 2013 09:28:13 -0500 Received: from mout.web.de ([212.227.15.4]:60722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tz6jj-0002p0-GO; Sat, 26 Jan 2013 09:28:03 -0500 Received: from localhost.localdomain ([84.148.27.138]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0MgwO8-1UL3Qn3i76-00MaPq; Sat, 26 Jan 2013 15:28:02 +0100 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Sat, 26 Jan 2013 15:27:59 +0100 Message-Id: <1359210479-12807-1-git-send-email-andreas.faerber@web.de> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-Provags-ID: V02:K0:X8EgTQjYe3itf80hD581RzQ2Fj0MNAU5aaw8rbxGazp cOau1hdpejNDWVYly7fIafJ/gC7aoSJFr99ckpVDq2XKNE+EfJ 10UnUHxOMV+UdQd5fbDPXHf64+SO3lVZ9H63BFzr7jlCRSoZBx wkwK6XFn0Oo7opONdyBoGpDcmeU39A7aa9rBfW8Kq/qCTKUfII 5dVZzkj+7kxiFcWZR/VSw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.4 Cc: qemu-trivial@nongnu.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= , qemu-stable@nongnu.org Subject: [Qemu-devel] [PATCH for-1.4] tests: Fix {rtc, m48t59}-test build on illumos X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- tests/m48t59-test.c | 2 ++ tests/rtc-test.c | 2 ++ 2 Dateien geändert, 4 Zeilen hinzugefügt(+) diff --git a/tests/m48t59-test.c b/tests/m48t59-test.c index d79f554..77d69b3 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 e7123ca..203c0fc 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); }