Patchwork mtd-utils: add option to not force largefile support

login
register
mail settings
Submitter Peter Korsgaard
Date Feb. 3, 2010, 9:18 a.m.
Message ID <1265188726-23746-1-git-send-email-jacmet@sunsite.dk>
Download mbox | patch
Permalink /patch/44360/
State Accepted
Commit acabf7fcea06b7a2926837523561861ed14cab31
Headers show

Comments

Peter Korsgaard - Feb. 3, 2010, 9:18 a.m.
Not all systems have largefile support (E.G. uClibc depending on config),
so unconditionally enforcing largefile breaks the build.

Work around it by adding a WITHOUT_LARGEFILE flag, similar to the existing
WITHOUT_XATTR.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 common.mk |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
Artem Bityutskiy - Feb. 15, 2010, 1:42 p.m.
On Wed, 2010-02-03 at 10:18 +0100, Peter Korsgaard wrote:
> Not all systems have largefile support (E.G. uClibc depending on config),
> so unconditionally enforcing largefile breaks the build.
> 
> Work around it by adding a WITHOUT_LARGEFILE flag, similar to the existing
> WITHOUT_XATTR.
> 
> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

Pushed to mtd-utils.git, thanks!

Patch

diff --git a/common.mk b/common.mk
index 5e92b07..d704b44 100644
--- a/common.mk
+++ b/common.mk
@@ -12,7 +12,10 @@  WFLAGS := -Wall \
 	$(call cc-option,-Wwrite-strings) \
 	$(call cc-option,-Wno-sign-compare)
 CFLAGS += $(WFLAGS)
-CPPFLAGS += -D_FILE_OFFSET_BITS=64
+
+ifneq ($(WITHOUT_LARGEFILE), 1)
+  CPPFLAGS += -D_FILE_OFFSET_BITS=64
+endif
 
 DESTDIR ?= /usr/local
 PREFIX=/usr