WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] build fixes

To: Patrick Colp <pjcolp@xxxxxxxxx>
Subject: Re: [Xen-devel] build fixes
From: Christoph Egger <Christoph.Egger@xxxxxxx>
Date: Tue, 12 Jan 2010 18:47:59 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Tue, 12 Jan 2010 09:49:35 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B4CB49A.90802@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C772640A.6287%keir.fraser@xxxxxxxxxxxxx> <4B4CB49A.90802@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.10
On Tuesday 12 January 2010 18:42:50 Patrick Colp wrote:
> Keir Fraser wrote:
> > On 12/01/2010 17:22, "Ian Jackson" <Ian.Jackson@xxxxxxxxxxxxx> wrote:
> >>> -    seek_ret = lseek64(fd, i << PAGE_SHIFT, SEEK_SET);
> >>> +    seek_ret = lseek(fd, i << PAGE_SHIFT, SEEK_SET);
> >>
> >> This is just wrong.  It will break on >2G files.
> >
> > We build everything under tools/ with LFS support enabled, so off_t is 64
> > bits even in 32-bit environments. FYI The bits to enable LFS support are
> > in tools/Rules.mk.
>
> According to the lseek64 man page, for 32-bit architectures to have 64-bit
> off_t, you need:
>
> #define _FILE_OFFSET_BITS 64
>
> Which, as far as I know, isn't set. LFS just makes lseek64 available
> (without it, the function doesn't exist).

Ah, good to know. Since lseek64() isn't POSIX and therefore
breaks build on non-Linux, LFS should be disabled and
-D_FILE_OFFSET_BITS=64 should be used in CFLAGS under tools/ .

Christoph


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>