]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tests/qtest: Adapt {m48t59,rtc}-test cases for win32
authorBin Meng <bin.meng@windriver.com>
Wed, 24 Aug 2022 09:39:53 +0000 (17:39 +0800)
committerThomas Huth <thuth@redhat.com>
Thu, 25 Aug 2022 13:24:09 +0000 (15:24 +0200)
There is no tm_gmtoff member in 'struct tm' on Windows.
Update rtc-test.c and m48t59-test.c accordingly.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220824094029.1634519-16-bmeng.cn@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/qtest/m48t59-test.c
tests/qtest/rtc-test.c

index b94a1230f7fdf742102597f402e2ea894689320b..843d2ced8e25dadab35111b5678142f7aec78243 100644 (file)
@@ -137,7 +137,7 @@ static void cmos_get_date_time(QTestState *s, struct tm *date)
     date->tm_mday = mday;
     date->tm_mon = mon - 1;
     date->tm_year = base_year + year - 1900;
-#ifndef __sun__
+#if !defined(__sun__) && !defined(_WIN32)
     date->tm_gmtoff = 0;
 #endif
 
index 8126ab1bdb8098db7b7c4b872cd8111ad9d71ad1..02ed4e1238599d2558d677dd53a91dfa0d833bec 100644 (file)
@@ -111,7 +111,7 @@ 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__
+#if !defined(__sun__) && !defined(_WIN32)
     date->tm_gmtoff = 0;
 #endif