From patchwork Fri Jan 4 09:43:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 209424 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 BC6F32C0084 for ; Fri, 4 Jan 2013 20:43:22 +1100 (EST) Received: from localhost ([::1]:45762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tr3o5-0001FF-01 for incoming@patchwork.ozlabs.org; Fri, 04 Jan 2013 04:43:17 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tr3nz-0001EJ-0l for qemu-devel@nongnu.org; Fri, 04 Jan 2013 04:43:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tr3nx-0006ya-La for qemu-devel@nongnu.org; Fri, 04 Jan 2013 04:43:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tr3nx-0006yC-DW for qemu-devel@nongnu.org; Fri, 04 Jan 2013 04:43:09 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r049h7pc013230 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 4 Jan 2013 04:43:07 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-25.ams2.redhat.com [10.36.116.25]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r049h6fZ028478; Fri, 4 Jan 2013 04:43:06 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 74969407D2; Fri, 4 Jan 2013 10:43:05 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 4 Jan 2013 10:43:05 +0100 Message-Id: <1357292585-26746-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH] rtc: skip year-2038 overflow check in case time_t is 32bit only 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 Signed-off-by: Gerd Hoffmann --- tests/rtc-test.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tests/rtc-test.c b/tests/rtc-test.c index 02edbf5..548200a 100644 --- a/tests/rtc-test.c +++ b/tests/rtc-test.c @@ -201,6 +201,10 @@ static void set_year_20xx(void) g_assert_cmpint(cmos_read(RTC_YEAR), ==, 0x11); g_assert_cmpint(cmos_read(RTC_CENTURY), ==, 0x20); + if (sizeof(time_t) == 32) { + return; + } + /* Set a date in 2080 to ensure there is no year-2038 overflow. */ cmos_write(RTC_REG_A, 0x76); cmos_write(RTC_YEAR, 0x80);