summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-11-22 22:14:45 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2009-11-22 22:14:45 (GMT)
commit0017d6b3b5e77fc89c531375b5bab7598ae89443 (patch)
tree2a0ad0a0792b44e57ab30988996c7e4bf025d21a
parent796e2b6cccfe39e0a049871c3daff073cde00174 (diff)
downloadbuildroot-0017d6b3b5e77fc89c531375b5bab7598ae89443.tar.gz
buildroot-0017d6b3b5e77fc89c531375b5bab7598ae89443.tar.bz2
package/nbd: fix build with !BR2_LARGEFILE
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--package/nbd/nbd-fix-build-with-disable-lfs.patch30
-rw-r--r--package/nbd/nbd.mk1
2 files changed, 31 insertions, 0 deletions
diff --git a/package/nbd/nbd-fix-build-with-disable-lfs.patch b/package/nbd/nbd-fix-build-with-disable-lfs.patch
new file mode 100644
index 0000000..5b270aa
--- /dev/null
+++ b/package/nbd/nbd-fix-build-with-disable-lfs.patch
@@ -0,0 +1,30 @@
+From 6d452ab0247770a446cfa6dd9b8b4ddea6c8fa4b Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <jacmet@sunsite.dk>
+Date: Sun, 22 Nov 2009 23:01:52 +0100
+Subject: [PATCH] lfs.h: fix build with --disable-lfs
+
+Running ./configure with --disable-lfs #define's NBD_LFS to 0 and
+doesn't #undef it, so the LFS check should use #if rather than #ifdef
+similar to how it is done in cliserv.h
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ lfs.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/lfs.h b/lfs.h
+index 8f90f81..929ce08 100644
+--- a/lfs.h
++++ b/lfs.h
+@@ -2,7 +2,7 @@
+ #define LFS_H
+
+ #include "config.h"
+-#ifdef NBD_LFS
++#if NBD_LFS
+ #define _FILE_OFFSET_BITS 64
+ #define _LARGEFILE_SOURCE
+ #endif /* NBD_LFS */
+--
+1.6.3.3
+
diff --git a/package/nbd/nbd.mk b/package/nbd/nbd.mk
index df8e167..bcb8677 100644
--- a/package/nbd/nbd.mk
+++ b/package/nbd/nbd.mk
@@ -39,6 +39,7 @@ $(NBD_DIR)/.configured: $(NBD_DIR)/.patched
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--sysconfdir=/etc \
+ $(if $(BR2_LARGEFILE),--enable-lfs,--disable-lfs) \
)
touch $@