summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorEric Andersen2004-05-26 11:59:19 +0000
committerEric Andersen2004-05-26 11:59:19 +0000
commit42f8883c71b908409bee7f4c77e77b9bef5d20d7 (patch)
tree0b4c4c3b138dbbae3400a997a1843039e2dca7ad /util-linux
parent823b17263adfc8408f3e8596c1e1ad525702d4e0 (diff)
downloadbusybox-42f8883c71b908409bee7f4c77e77b9bef5d20d7.zip
busybox-42f8883c71b908409bee7f4c77e77b9bef5d20d7.tar.gz
Per suggestion from Bastian Blank, be less evil when we force fdisk to
transparently remap 32-bit interfaces to actually use 64 bit interfaces. -Erik
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/Makefile.in11
-rw-r--r--util-linux/fdisk.c9
2 files changed, 11 insertions, 9 deletions
diff --git a/util-linux/Makefile.in b/util-linux/Makefile.in
index 0be0fca..72136f1 100644
--- a/util-linux/Makefile.in
+++ b/util-linux/Makefile.in
@@ -49,3 +49,14 @@ libraries-y+=$(UTILLINUX_DIR)$(UTILLINUX_AR)
$(UTILLINUX_DIR)$(UTILLINUX_AR): $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y))
$(AR) -ro $@ $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y))
+ifneq ($(strip $(CONFIG_LFS)),y)
+ifeq ($(strip $(FDISK_SUPPORT_LARGE_DISKS)),y)
+
+$(UTILLINUX_DIR)fdisk.o: $(UTILLINUX_DIR)fdisk.c
+ $(CC) $(CFLAGS) \
+ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
+ $(EXTRA_CFLAGS) -c -o $@ $<
+
+endif
+endif
+
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 5e7e79c..b27a8aa 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -15,15 +15,6 @@
#define PROC_PARTITIONS "/proc/partitions"
#include <features.h>
-/* Force fdisk to transparently remap 32-bit interfaces
- * to instead really use 64 bit interfaces, at least for
- * glibc and uClibc... */
-#ifndef __USE_FILE_OFFSET64
-# ifdef FDISK_SUPPORT_LARGE_DISKS
-# define __USE_FILE_OFFSET64 1
-# endif
-#endif
-
#include <sys/types.h>
#include <sys/stat.h> /* stat */
#include <ctype.h>