Blame 0003-rtc-test-skip-year-2038-overflow-check-in-case-time_.patch

6986e1
From 43eb809a0f98b644cf4a2dd6a257185ad781346c Mon Sep 17 00:00:00 2001
6986e1
From: Gerd Hoffmann <kraxel@redhat.com>
6986e1
Date: Mon, 7 Jan 2013 15:11:52 +0100
6986e1
Subject: [PATCH] rtc-test: skip year-2038 overflow check in case time_t is
6986e1
 32bit only
6986e1
6986e1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6986e1
---
6986e1
 tests/rtc-test.c | 4 ++++
6986e1
 1 file changed, 4 insertions(+)
6986e1
6986e1
diff --git a/tests/rtc-test.c b/tests/rtc-test.c
6986e1
index 02edbf5..e7123ca 100644
6986e1
--- a/tests/rtc-test.c
6986e1
+++ b/tests/rtc-test.c
6986e1
@@ -201,6 +201,10 @@ static void set_year_20xx(void)
6986e1
     g_assert_cmpint(cmos_read(RTC_YEAR), ==, 0x11);
6986e1
     g_assert_cmpint(cmos_read(RTC_CENTURY), ==, 0x20);
6986e1
 
6986e1
+    if (sizeof(time_t) == 4) {
6986e1
+        return;
6986e1
+    }
6986e1
+
6986e1
     /* Set a date in 2080 to ensure there is no year-2038 overflow.  */
6986e1
     cmos_write(RTC_REG_A, 0x76);
6986e1
     cmos_write(RTC_YEAR, 0x80);
6986e1
-- 
6986e1
1.8.1
6986e1