[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LFS problem with Debian testing



On Wed, Aug 20, 2003 at 11:08:20AM +0200, Jukka Salmi wrote:
> I'm having problems with opening large (>2 GB) files on a Debian
> testing system:
> 
> ---
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <fcntl.h>
> [...]
> int fd;
> fd = open(argv[1], O_RDONLY | O_LARGEFILE);
> [...]
> ---
> 
> gcc complains that O_LARGEFILE is undeclared. However, if I
> #define O_LARGEFILE 0100000
> the program works.

Try building with the -D_FILE_OFFSET_BITS=64 option. See 'info libc'
under "Feature Test Macros" for more details.

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: