Bernhard Reutner-Fischer: mdadm fix compilation for uClibc

Martin F. Krafft madduck at alioth.debian.org
Mon Feb 16 10:52:45 UTC 2009


Module: mdadm
Branch: master
Commit: 2df1f269113c687e0c23fad2ca9bcf3c4dcbb382
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=2df1f269113c687e0c23fad2ca9bcf3c4dcbb382

Author: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
Date:   Mon Dec  8 17:00:59 2008 +0100

mdadm fix compilation for uClibc


2008-12-08  Bernhard Reutner-Fischer  <rep.dot.nop at 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 at gmail.com>

---

 Makefile |    3 ---
 md5.h    |    2 +-
 mdadm.h  |    5 ++++-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 52bd550..c0e2b5d 100644
--- 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 1c29e67..145970d 100644
--- 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 b0a8c5e..ab779b2 100644
--- 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




More information about the pkg-mdadm-commits mailing list