提交 a05ddd92 编写于 作者: A Andreas Färber 提交者: Stefan Hajnoczi

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.

Cc: qemu-stable@nongnu.org
Signed-off-by: NAndreas Färber <andreas.faerber@web.de>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 0b087861
......@@ -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);
}
......
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册