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: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
0b0878611c
commit
a05ddd9216
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user