]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdadm fix compilation for uClibc
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 8 Dec 2008 16:00:59 +0000 (17:00 +0100)
committerNeilBrown <neilb@suse.de>
Sun, 1 Feb 2009 22:53:51 +0000 (09:53 +1100)
2008-12-08  Bernhard Reutner-Fischer  <rep.dot.nop@gmail.com>

* Makefile (dadm.uclibc): Remove misspelled and unneeded rule.
* md5.h: Include stdint.h for uClibc.
* mdadm.h: uClibc defines __UCLIBC__. If uClibc has LFS off
then use lseek instead of lseek64.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Makefile
md5.h
mdadm.h

index 52bd55051049cc470adbaf36955646f06da68adc..c0e2b5da6136767a8e6d339dd3415b152953f3da 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -106,9 +106,6 @@ mdadm.static : $(OBJS) $(STATICOBJS)
 mdadm.tcc : $(SRCS) mdadm.h
        $(TCC) -o mdadm.tcc $(SRCS)
 
-dadm.uclibc : $(SRCS) mdadm.h
-       $(UCLIBC_GCC) -DUCLIBC -DHAVE_STDINT_H -o mdadm.uclibc $(SRCS) $(STATICSRC)
-
 mdadm.klibc : $(SRCS) mdadm.h
        rm -f $(OBJS) 
        gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32 $(CFLAGS) $(SRCS)
diff --git a/md5.h b/md5.h
index 1c29e67b4ef01bc7ee2b8a3e1a0a4f937aeb9fd0..145970d4e1514647e35964347068c6f9f39a54f5 100644 (file)
--- a/md5.h
+++ b/md5.h
@@ -27,7 +27,7 @@
 #if HAVE_INTTYPES_H
 # include <inttypes.h>
 #endif
-#if HAVE_STDINT_H || _LIBC
+#if HAVE_STDINT_H || _LIBC || defined __UCLIBC__
 # include <stdint.h>
 #endif
 
diff --git a/mdadm.h b/mdadm.h
index b0a8c5e776b5c4a920461b38195c3b474f24008d..ab779b286dbe31fb2af04ff75c0620d1b5cdfb04 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -383,8 +383,11 @@ struct stat64;
 #define HAVE_NFTW  we assume
 #define HAVE_FTW
 
-#ifdef UCLIBC
+#ifdef __UCLIBC__
 # include <features.h>
+# ifndef __UCLIBC_HAS_LFS__
+#  define lseek64 lseek
+# endif
 # ifndef  __UCLIBC_HAS_FTW__
 #  undef HAVE_FTW
 #  undef HAVE_NFTW