From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Colp Subject: Re: build fixes Date: Tue, 12 Jan 2010 09:42:50 -0800 Message-ID: <4B4CB49A.90802@cs.ubc.ca> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Christoph Egger , "xen-devel@lists.xensource.com" , Ian Jackson List-Id: xen-devel@lists.xenproject.org Keir Fraser wrote: > On 12/01/2010 17:22, "Ian Jackson" 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). Patrick