From 3c7e9105642864f9498235e41b5c99aa9f74e0c9 Mon Sep 17 00:00:00 2001 From: nbd Date: Fri, 29 Jun 2012 20:41:45 +0000 Subject: [PATCH] mdadm: remove old junk that breaks eglibc compilation git-svn-id: svn://svn.openwrt.org/openwrt/packages@32537 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- utils/mdadm/Makefile | 2 +- .../patches/200-uclibc_0.9.30_compat.patch | 40 ------------------- 2 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 utils/mdadm/patches/200-uclibc_0.9.30_compat.patch diff --git a/utils/mdadm/Makefile b/utils/mdadm/Makefile index c25758734..e631e21c1 100644 --- a/utils/mdadm/Makefile +++ b/utils/mdadm/Makefile @@ -34,7 +34,7 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -DUCLIBC -DHAVE_STDINT_H" \ + CFLAGS="$(TARGET_CFLAGS) -DHAVE_STDINT_H" \ LDFLAGS="$(TARGET_LDFLAGS)" \ mdadm mdassemble endef diff --git a/utils/mdadm/patches/200-uclibc_0.9.30_compat.patch b/utils/mdadm/patches/200-uclibc_0.9.30_compat.patch deleted file mode 100644 index a6fb5bd4b..000000000 --- a/utils/mdadm/patches/200-uclibc_0.9.30_compat.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/mdadm.h -+++ b/mdadm.h -@@ -33,6 +33,37 @@ extern __off64_t lseek64 __P ((int __fd, - # endif - #endif - -+#ifdef UCLIBC -+# include -+# if __UCLIBC_MINOR__ <= 9 && __UCLIBC_SUBLEVEL__ <= 30 -+ -+#include -+void *memalign(size_t blocksize, size_t bytes); -+static inline int posix_memalign(void **memptr, size_t alignment, size_t size) -+{ -+ if (alignment % sizeof(void *) != 0) -+ return EINVAL; -+ -+ *memptr = memalign(alignment, size); -+ return (*memptr != NULL ? 0 : ENOMEM); -+} -+ -+#include -+char *strdup(const char *s); -+char *realpath(const char *path, char *resolved_path); -+static inline char *canonicalize_file_name(const char *path) -+{ -+ char resolved[PATH_MAX] = { 0 }; -+ -+ if (!realpath(path, resolved)) -+ return NULL; -+ -+ return strdup(resolved); -+} -+ -+# endif /* __UCLIBC_MINOR__ <= 9 && __UCLIBC_SUBLEVEL__ <= 30 */ -+#endif /* UCLIBC */ -+ - #include - #include - #include