tests: Fix {rtc, m48t59}-test build on illumos
PATCH 1/1 tests: Fix {rtc, m48t59}-test build on illumos
Struct tm does not have tm_gmtoff field on illumos. Fix the build by not zero-initializing these fields on Solaris.
Signed-off-by Andreas Färber <[email protected]>
--- tests/m48t59-test.c | 2 ++ tests/rtc-test.c | 2 ++
2 Dateien geändert, 4 Zeilen hinzugefügt(+)
tests/m48t59-test.c +2 -0
@@ -142,7 +142,9 @@ 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__ date->tm_gmtoff =0 ; +#endif ts =mktime (date); }
tests/rtc-test.c +2 -0
@@ -115,7 +115,9 @@ 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__ date->tm_gmtoff =0 ; +#endif ts =mktime (date); }
Signature · 1 line
1.7.10.4
Stefan Hajnoczi
AppliedQuoted 9 lines · Andreas Färber
Struct tm does not have
tm_gmtofffield on illumos. Fix the build by not zero-initializing these fields on Solaris.Signed-off-by Andreas Färber <[email protected]>--- tests/m48t59-test.c | 2 ++ tests/rtc-test.c | 2 ++2 Dateien geändert, 4 Zeilen hinzugefügt(+)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan