From patchwork Thu Jan 10 14:49:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/2] rtc-test: skip year-2038 overflow check in case time_t is 32bit only From: Gerd Hoffmann X-Patchwork-Id: 211031 Message-Id: <1357829380-17599-2-git-send-email-kraxel@redhat.com> To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Date: Thu, 10 Jan 2013 15:49:39 +0100 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..e7123ca 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) == 4) { + 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);