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

RE: 64 bit LFS compile error

> > > On amd64 off_t and all the others are naturally 64bit. And for 32bit
> > > code you should rather enable LFS so off_t is 64bit instead of using
> > > off64_t (adding -D_FILE_OFFSET_BITS=64).
> >
> > I'm sorry, but I don't quite follow your meaning.  Are you saying I
> should
> > replace all references to off_64t with off_t in readwrite.c?  And  I
> should
> > add -D_FILE_OFFSET_BITS=64 to what file?
> off64_t does exist.  You need to do define _LARGEFILE64_SOURCE
> (or _GNU_SOURCE), so something like:
> #define _LARGEFILE64_SOURCE    1
> #include <sys/types.h>

	Oh, geez, I'm an idiot.  I had tried this, and I couldn't figure out
why it wasn't working.  It wasn't working because I forgot the "#"
metacharacter.  I fixed the define, and now the code is no longer failing
there, but now it's failing to find zlib.h and then suffering a bunch of
casting errors and pointer dereferencing errors.

Reply to: