Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 340e01248478ba8b78a6d4d1809b1eff > files > 775

kvm-83-270.el5_11.src.rpm

From e95eb27a578ce3031dd18a1aae49b32d688eb78b Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Thu, 17 Sep 2009 14:06:04 -0300
Subject: [PATCH 37/38] time_t is a long in x86_64

RH-Author: Juan Quintela <quintela@redhat.com>
Message-id: <03e4f2f01940243da3409a57ee8766a5b6709499.1253119743.git.quintela@redhat.com>
Patchwork-id: 3420
O-Subject: [PATCH 2/2] time_t is a long in x86_64
Bugzilla: 515749
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>

add proper type to rtc_ti, and cast result of arithmetic to long (Markus)

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 qemu/hw/mc146818rtc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 qemu/hw/mc146818rtc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/qemu/hw/mc146818rtc.c b/qemu/hw/mc146818rtc.c
index 1426f8e..80e564c 100644
--- a/qemu/hw/mc146818rtc.c
+++ b/qemu/hw/mc146818rtc.c
@@ -280,7 +280,7 @@ static void rtc_set_time(RTCState *s)
     tm->tm_mon = from_bcd(s, s->cmos_data[RTC_MONTH]) - 1;
     tm->tm_year = from_bcd(s, s->cmos_data[RTC_YEAR]) + 100;
     {   /* notify monitoring software of the change */
-        int rtc_ti;
+        time_t rtc_ti;
 
         /* rtc_utc is now declared static. just assume -localtime */
         /* if (rtc_utc)
@@ -288,7 +288,8 @@ static void rtc_set_time(RTCState *s)
         else */
             rtc_ti = mktime(tm);
             term_printf_async(RTC_ASYNC_EVENT,
-			      "RTC: new time is UTC%+d\n", rtc_ti - time(NULL));
+			      "RTC: new time is UTC%+ld\n",
+                              (long)(rtc_ti - time(NULL)));
     }
 }
 
-- 
1.6.3.rc4.29.g8146