From 0e40c7b459f3803bb44bca20304389c6999a2770 Mon Sep 17 00:00:00 2001 From: Waldemar Date: Sat, 19 Dec 2009 14:25:32 +0059 Subject: add more mirbsd compatibility patches --- package/busybox/Makefile | 12 +++--- package/busybox/patches/patch-include_libbb_h | 18 +++++++++ package/busybox/patches/patch-include_platform_h | 47 ++++++++++++++++++++++++ package/uclibc/Makefile | 4 +- 4 files changed, 73 insertions(+), 8 deletions(-) create mode 100644 package/busybox/patches/patch-include_libbb_h create mode 100644 package/busybox/patches/patch-include_platform_h (limited to 'package') diff --git a/package/busybox/Makefile b/package/busybox/Makefile index 6a0569428..78b741ca3 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -24,30 +24,30 @@ ifeq ($(ADK_NATIVE),y) yes '' | \ $(MAKE) V=1 \ IPKG_ARCH="$(ARCH)" \ - ARCH="$(ARCH)" -C $(WRKBUILD) oldconfig + ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig else yes '' | \ $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS)" IPKG_ARCH="$(ARCH)" \ - ARCH="$(ARCH)" -C $(WRKBUILD) oldconfig + ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig endif do-build: ifeq ($(ADK_NATIVE),y) $(MAKE) V=1 \ - IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) busybox + IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox else $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ - IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) busybox + IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox endif do-install: ${TOPDIR}/.config ifeq ($(ADK_NATIVE),y) $(MAKE) V=1 \ - IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) install + IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install else $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ - IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) install + IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install endif ifeq ($(DEBUG),1) ${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \ diff --git a/package/busybox/patches/patch-include_libbb_h b/package/busybox/patches/patch-include_libbb_h new file mode 100644 index 000000000..0087dbde5 --- /dev/null +++ b/package/busybox/patches/patch-include_libbb_h @@ -0,0 +1,18 @@ +--- busybox-1.15.2.orig/include/libbb.h Thu Oct 8 03:04:16 2009 ++++ busybox-1.15.2/include/libbb.h Sat Dec 19 12:42:57 2009 +@@ -48,6 +48,7 @@ + #define PATH_MAX 256 + #endif + ++#if !(defined __APPLE__ || defined __FreeBSD__ || defined __MirBSD__ ) + #ifdef HAVE_MNTENT_H + #include + #endif +@@ -61,6 +62,7 @@ + #include + #include + #include ++#endif + #endif + + #if ENABLE_LOCALE_SUPPORT diff --git a/package/busybox/patches/patch-include_platform_h b/package/busybox/patches/patch-include_platform_h new file mode 100644 index 000000000..7c5539efe --- /dev/null +++ b/package/busybox/patches/patch-include_platform_h @@ -0,0 +1,47 @@ +--- busybox-1.15.2.orig/include/platform.h Sat Sep 26 15:14:33 2009 ++++ busybox-1.15.2/include/platform.h Sat Dec 19 12:53:00 2009 +@@ -7,6 +7,8 @@ + #ifndef BB_PLATFORM_H + #define BB_PLATFORM_H 1 + ++#include ++ + /* Convenience macros to test the version of gcc. */ + #undef __GNUC_PREREQ + #if defined __GNUC__ && defined __GNUC_MINOR__ +@@ -133,7 +135,7 @@ char *strchrnul(const char *s, int c); + # define bswap_32 __bswap32 + # define bswap_16 __bswap16 + # define __BIG_ENDIAN__ (_BYTE_ORDER == _BIG_ENDIAN) +-#elif !defined __APPLE__ ++#elif !(defined __APPLE__ || defined BSD) + # include + # include + #endif +@@ -190,7 +192,7 @@ char *strchrnul(const char *s, int c); + + /* ---- Networking ------------------------------------------ */ + +-#ifndef __APPLE__ ++#if !(defined __APPLE__ || defined BSD) + # include + # if !defined(__socklen_t_defined) && !defined(_SOCKLEN_T_DECLARED) + typedef int socklen_t; +@@ -202,7 +204,7 @@ typedef int socklen_t; + /* ---- Compiler dependent settings ------------------------- */ + + #if (defined __digital__ && defined __unix__) \ +- || defined __APPLE__ || defined __FreeBSD__ ++ || defined __APPLE__ || defined __FreeBSD__ || defined BSD + # undef HAVE_MNTENT_H + # undef HAVE_SYS_STATFS_H + #else +@@ -231,7 +233,7 @@ typedef int socklen_t; + # define HAVE_FEATURES_H + # include + # define HAVE_STDINT_H +-#elif !defined __APPLE__ ++#elif !(defined __APPLE__ || defined BSD) + /* Largest integral types. */ + # if BB_BIG_ENDIAN + /* Looks BROKEN! */ diff --git a/package/uclibc/Makefile b/package/uclibc/Makefile index c89e20fe6..4d96eceae 100644 --- a/package/uclibc/Makefile +++ b/package/uclibc/Makefile @@ -39,7 +39,7 @@ do-install: HOSTCC="$(HOSTCC)" \ CPU_CFLAGS="$(TARGET_CFLAGS)" \ install_headers - @find $(IDIR_UCLIBC_DEV) -name .install -delete - @find $(IDIR_UCLIBC_DEV) -name ..install.cmd -delete + @find $(IDIR_UCLIBC_DEV) -name .install -exec rm {} \; + @find $(IDIR_UCLIBC_DEV) -name ..install.cmd -exec rm {} \; include ${TOPDIR}/mk/pkg-bottom.mk -- cgit v1.2.3