]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Add klibc support to mdadm.h
authormaximilian attems <max@stro.at>
Fri, 21 Sep 2007 17:32:17 +0000 (19:32 +0200)
committerNeil Brown <neilb@suse.de>
Mon, 24 Sep 2007 03:21:38 +0000 (13:21 +1000)
klibc still misses a lot functionality to let mdadm link against,
this small step helps to get to the real trouble.. :)

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Neil Brown <neilb@suse.de>
mdadm.h

diff --git a/mdadm.h b/mdadm.h
index ac7d4b47430404e34837b085393d771f405c1ef3..dba09f0f838ee8f61f69c63a573e9e250097b0de 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -29,7 +29,7 @@
 
 #define        _GNU_SOURCE
 #include       <unistd.h>
-#ifndef __dietlibc__
+#if !defined(__dietlibc__) && !defined(__KLIBC__)
 extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
 #else
 # if defined(__NO_STAT64) || __WORDSIZE != 32
@@ -97,6 +97,7 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
                     ((x) & 0x00000000ff000000ULL) << 8 | \
                     ((x) & 0x000000ff00000000ULL) >> 8)
 
+#if !defined(__KLIBC__)
 #if BYTE_ORDER == LITTLE_ENDIAN
 #define        __cpu_to_le16(_x) (_x)
 #define __cpu_to_le32(_x) (_x)
@@ -114,6 +115,7 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
 #else
 #  error "unknown endianness."
 #endif
+#endif /* __KLIBC__ */
 
 
 
@@ -398,6 +400,11 @@ struct stat64;
 # undef HAVE_NFTW
 #endif
 
+#if defined(__KLIBC__)
+# undef HAVE_NFTW
+# undef HAVE_FTW
+#endif
+
 #ifndef HAVE_NFTW
 # define FTW_PHYS 1
 # ifndef HAVE_FTW