mtd-utils-largefile.patch 970 B

1234567891011121314151617181920212223242526272829303132333435
  1. From 90be45c82fa8c54ceb202619024142ed3db11c14 Mon Sep 17 00:00:00 2001
  2. From: Peter Korsgaard <jacmet@sunsite.dk>
  3. Date: Wed, 3 Feb 2010 09:23:19 +0100
  4. Subject: [PATCH] mtd-utils: add option to not force largefile support
  5. Not all systems have largefile support (E.G. uClibc depending on config),
  6. so unconditionally enforcing largefile breaks the build.
  7. Work around it by adding a WITHOUT_LARGEFILE flag, similar to the existing
  8. WITHOUT_XATTR.
  9. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  10. ---
  11. common.mk | 5 ++++-
  12. 1 files changed, 4 insertions(+), 1 deletions(-)
  13. diff --git a/common.mk b/common.mk
  14. index 5e92b07..d704b44 100644
  15. --- a/common.mk
  16. +++ b/common.mk
  17. @@ -12,7 +12,10 @@ WFLAGS := -Wall \
  18. $(call cc-option,-Wwrite-strings) \
  19. $(call cc-option,-Wno-sign-compare)
  20. CFLAGS += $(WFLAGS)
  21. -CPPFLAGS += -D_FILE_OFFSET_BITS=64
  22. +
  23. +ifneq ($(WITHOUT_LARGEFILE), 1)
  24. + CPPFLAGS += -D_FILE_OFFSET_BITS=64
  25. +endif
  26. DESTDIR ?= /usr/local
  27. PREFIX=/usr
  28. --
  29. 1.6.5