From 98c18f5a0a8a1ad9309307f0887aa96f6cc13094 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Wed, 23 Oct 2002 03:24:53 +0000 Subject: * switch to always using lseek and build with -D_FILE_OFFSET_BITS=64 * fix warning from dos.h based on patch from Dan Burcaw (dburcaw@terrasoftsolutions.com) --- balkan/Makefile | 2 +- balkan/dos.c | 2 +- balkan/dos.h | 2 +- balkan/sun.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/balkan/Makefile b/balkan/Makefile index 218a2f751..fe2f52ab3 100644 --- a/balkan/Makefile +++ b/balkan/Makefile @@ -3,7 +3,7 @@ include ../Makefile.inc #PYTHONLIBDIR = $(DESTDIR)/usr/lib/python1.5/site-packages OBJECTS = rw.o dos.o sun.o bsdlabel.o -CFLAGS=-I$(PYTHONINCLUDE) -Os +CFLAGS=-I$(PYTHONINCLUDE) -Os -D_FILE_OFFSET_BITS=64 TARGET = libbalkan.a diff --git a/balkan/dos.c b/balkan/dos.c index b60fee7ba..4b9bccd2f 100644 --- a/balkan/dos.c +++ b/balkan/dos.c @@ -39,7 +39,7 @@ static int readSingleTable(int fd, struct singlePartitionTable * table, unsigned char sector[SECTOR_SIZE]; unsigned short magic; - if (lseek64(fd, ((off64_t) SECTOR_SIZE * (off64_t) partSector), + if (lseek(fd, ((off64_t) SECTOR_SIZE * (off64_t) partSector), SEEK_SET) < 0) return BALKAN_ERROR_ERRNO; diff --git a/balkan/dos.h b/balkan/dos.h index 753fc4193..f5d2809b1 100644 --- a/balkan/dos.h +++ b/balkan/dos.h @@ -3,4 +3,4 @@ int dospReadTable(int fd, struct partitionTable * table); -#endif; +#endif diff --git a/balkan/sun.c b/balkan/sun.c index 29e8578f8..aaec233e0 100644 --- a/balkan/sun.c +++ b/balkan/sun.c @@ -99,7 +99,7 @@ int sunpReadTable(int fd, struct partitionTable * table) { default: if (table->parts[i].type != WHOLE_DISK && - lseek64(fd, (8192 + 0x55c + SECTOR_SIZE * + lseek(fd, (8192 + 0x55c + SECTOR_SIZE * (off64_t) table->parts[i].startSector), SEEK_SET) >= 0 && read(fd, &magic, 4) == 4 && -- cgit