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
+++ /dev/null
---- a/mdadm.h
-+++ b/mdadm.h
-@@ -33,6 +33,37 @@ extern __off64_t lseek64 __P ((int __fd,
- # endif
- #endif
-
-+#ifdef UCLIBC
-+# include <features.h>
-+# if __UCLIBC_MINOR__ <= 9 && __UCLIBC_SUBLEVEL__ <= 30
-+
-+#include <errno.h>
-+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 <limits.h>
-+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 <sys/types.h>
- #include <sys/stat.h>
- #include <stdlib.h>