[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] buildbot failure in qemu on default_mingw32
From: |
Zhang, Yang Z |
Subject: |
Re: [Qemu-devel] buildbot failure in qemu on default_mingw32 |
Date: |
Tue, 11 Sep 2012 07:15:41 +0000 |
Paolo Bonzini wrote on 2012-09-11:
> Il 11/09/2012 09:05, Zhang, Yang Z ha scritto:
>> how about the following patch:
>>
>> diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c index d63554f..30bbbe6
>> 100644 --- a/hw/mc146818rtc.c +++ b/hw/mc146818rtc.c @@ -556,14 +556,14
>> @@ static void rtc_set_cmos(RTCState *s, const struct tm *tm)
>>
>> static void rtc_update_time(RTCState *s)
>> {
>> - struct tm ret;
>> + struct tm *ret;
>> time_t guest_sec;
>> int64_t guest_nsec;
>>
>> guest_nsec = get_guest_rtc_ns(s);
>> guest_sec = guest_nsec / NSEC_PER_SEC;
>> - gmtime_r(&guest_sec, &ret);
>> - rtc_set_cmos(s, &ret);
>> + ret = gmtime(&guest_sec);
>> + rtc_set_cmos(s, ret);
>> }
>
> No, let's add a portability wrapper for gmtime_r instead.
Right, this is a better way to solve it.
Best regards,
Yang