[kpartx] kpartx large file support
authorSzabolcs Szakacsits <szaka@ntfs-3g.org>
Tue, 3 Jul 2007 21:10:54 +0000 (23:10 +0200)
committerChristophe Varoqui <christophe.varoqui@free.fr>
Tue, 3 Jul 2007 21:10:54 +0000 (23:10 +0200)
Apparently -D_LARGEFILE64_SOURCE doesn't always work:

failed to stat() 40GB-disk.img: Value too large for defined data type

Potential fix what we're using everywhere on many platforms with no
reported LFS problems for 5 years:

kpartx/Makefile

index f3d629d..b4cca6c 100644 (file)
@@ -6,7 +6,7 @@ BUILD=glibc
 
 include ../Makefile.inc
 
-CFLAGS += -I. -D_LARGEFILE64_SOURCE
+CFLAGS += -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 
 ifeq ($(strip $(BUILD)),klibc)
        OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o gpt.o crc32.o \