From 21c1b33aeb8165f2faa95eb30b852fc9014231af Mon Sep 17 00:00:00 2001 From: nbd Date: Mon, 26 Jan 2009 19:44:47 +0000 Subject: [PATCH] fix eglibc 2.8 cross-compile under darwin / mac os x git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14209 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../eglibc/patches/2.8/100-darwin_cross.patch | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 toolchain/eglibc/patches/2.8/100-darwin_cross.patch diff --git a/toolchain/eglibc/patches/2.8/100-darwin_cross.patch b/toolchain/eglibc/patches/2.8/100-darwin_cross.patch new file mode 100644 index 000000000..198b58388 --- /dev/null +++ b/toolchain/eglibc/patches/2.8/100-darwin_cross.patch @@ -0,0 +1,57 @@ +--- a/libc/sunrpc/rpc/types.h ++++ b/libc/sunrpc/rpc/types.h +@@ -68,6 +68,7 @@ typedef unsigned long rpcport_t; + #include + #endif + ++#if !defined(_CROSS_RPCGEN_) || !defined(__APPLE__) + #ifndef __u_char_defined + typedef __u_char u_char; + typedef __u_short u_short; +@@ -83,6 +84,7 @@ typedef __daddr_t daddr_t; + typedef __caddr_t caddr_t; + # define __daddr_t_defined + #endif ++#endif + + #include + #include +--- a/libc/sunrpc/rpc_main.c ++++ b/libc/sunrpc/rpc_main.c +@@ -40,7 +40,11 @@ + #include + #include + #include ++#ifdef _CROSS_RPCGEN_ ++#define gettext(X) (X) ++#else + #include ++#endif + #include + #include + #include +--- a/libc/sunrpc/rpc_scan.c ++++ b/libc/sunrpc/rpc_scan.c +@@ -39,7 +39,11 @@ + #include + #include + #include ++#ifdef _CROSS_RPCGEN_ ++#define gettext(X) (X) ++#else + #include ++#endif + #include "rpc_scan.h" + #include "rpc_parse.h" + #include "rpc_util.h" +--- a/libc/timezone/Makefile ++++ b/libc/timezone/Makefile +@@ -181,7 +181,7 @@ zic-objs = zic.o ialloc.o scheck.o + $(objpfx)zic: $(addprefix $(objpfx), $(zic-objs)) + + $(addprefix $(objpfx)cross-,$(zic-objs)): $(objpfx)cross-%.o: %.c +- gcc $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \ ++ gcc $< -c $(OUTPUT_OPTION) $(filter-out -DHAVE_GETTEXT,$(CFLAGS-$*.c)) $(CPPFLAGS-$*) \ + $(compile-mkdep-flags) + + $(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs)) -- 2.20.1