diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2013-01-04 10:37:50 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-01-10 15:23:39 +0100 |
commit | 4e45deedf57c6cc7113b588282d0c16f89298aff (patch) | |
tree | 305195b905d9dcd4bbff5bdb08f18c2f67e4852a | |
parent | 7cd5da7eef152a533c5774effd2e7bbfa5976c86 (diff) | |
download | hqemu-4e45deedf57c6cc7113b588282d0c16f89298aff.zip hqemu-4e45deedf57c6cc7113b588282d0c16f89298aff.tar.gz |
rtc-test: skip year-2038 overflow check in case time_t is 32bit only
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | 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); |