From: Peter Korsgaard Date: Sat, 3 Oct 2009 11:43:00 +0000 (+0200) Subject: mdadm: fix build without largefile support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=88f6a98479819267699d310cbde16b02d22889f7;p=buildroot.git mdadm: fix build without largefile support Signed-off-by: Peter Korsgaard --- diff --git a/package/mdadm/mdadm-2.6.1-003.uclibc-dont-force-largefile.patch b/package/mdadm/mdadm-2.6.1-003.uclibc-dont-force-largefile.patch new file mode 100644 index 0000000000..c671437d28 --- /dev/null +++ b/package/mdadm/mdadm-2.6.1-003.uclibc-dont-force-largefile.patch @@ -0,0 +1,27 @@ +[PATCH] mdadm: don't enable largefile support unconditionally on uClibc + +uClibc can be compiled without largefile support (and errors out if +_FILE_OFFSET_BITS is set to 64), so don't define it if that combination +is detected. + +Signed-off-by: Peter Korsgaard +--- + mdadm.h | 4 ++++ + 1 file changed, 4 insertions(+) + +Index: mdadm-2.6.7.1/mdadm.h +=================================================================== +--- mdadm-2.6.7.1.orig/mdadm.h ++++ mdadm-2.6.7.1/mdadm.h +@@ -28,7 +28,11 @@ + */ + + #define _GNU_SOURCE ++#include ++/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */ ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__)) + #define _FILE_OFFSET_BITS 64 ++#endif + #include + #if !defined(__dietlibc__) && !defined(__KLIBC__) + extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));