From: Ian Campbell Subject: Re: Xen 4.2.2 release patch Date: Thu, 25 Apr 2013 16:48:35 +0100 Message-ID: <1366904915.20256.566.camel@zakaz.uk.xensource.com> References: <20130425144848.GA8060@7heo.tk> <1366901933.20256.561.camel@zakaz.uk.xensource.com> <5179663A02000078000D0D62@nat28.tlf.novell.com> <20130425154405.GC16106@quantz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130425154405.GC16106@quantz> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Patrick Welche Cc: "xen-devel@lists.xen.org" , Ian Jackson , Jan Beulich , "7heo@7heo.tk" <7heo@7heo.tk> List-Id: xen-devel@lists.xenproject.org On Thu, 2013-04-25 at 16:44 +0100, Patrick Welche wrote: > On Thu, Apr 25, 2013 at 04:22:02PM +0100, Jan Beulich wrote: > > >>> On 25.04.13 at 16:58, Ian Campbell wrote: > > > On Thu, 2013-04-25 at 15:48 +0100, 7heo@7heo.tk wrote: > > >> I tried to build Xen from the git repository, > > >> cloning the RELEASE-4.2.2 tag, on a NetBSD > > >> 6.0.1 system installed on an i386 host. > > >> > > >> I got 4 warnings, causing the compilation to > > >> fail, due to the -Werror flag. > > >> > > >> Rather than removing the flag, I did prefer to > > >> patch the source, since the fix was really > > >> trivial. > > >> > > >> Please find the patch attached. > > > > > > Thanks. It really seems like casting is the only reliable way to print a > > > time_t :-/ > > > > Except that a cast to "long" here can turn out to be a truncation, > > so you'd really want to cast up to "long long". > > Maybe an > AC_CHECK_SIZEOF(time_t, [], [#include ]) > #if SIZEOF_TIME_T == 8 > #elif SIZEOF_TIME_T == 4 > is also necessary? > > The OPs system will have a 64-bit time_t but that isn't a given... As long as the case is to a larger type and the printf format matches I think that is fine. I don't think any system has a >64 bit time_t? Ian.