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

Re: LFS problem with Debian testing



On Wed, Aug 20, 2003 at 07:37:28PM +1000, Damien Solley wrote:
> On Wed, 2003-08-20 at 19:17, 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.
> > 
> > What am I doing wrong? Is there a problem with the header files? I'm using
> > libc6 2.3.1-16 and gcc 3.3.1 (both latest Debian testing packages) on a
> > i386 system.
> 
> Old kernel version? AFAIK, you need a recent (ish) kernel to create
> files greater than 2GB.

He was talking about the symbol *not being defined*, which means that it
can't be a kernel issue (at least in Debian, where kernel headers in
/usr/include are controlled by glibc; certainly not a question of the
running kernel).

My other mail should have the answer, I believe.

Cheers,

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



Reply to: