From b70fdbfbf1139605c22083b647337f2b16f62fc3 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 19 Jul 2010 10:49:42 +0200 Subject: fix compile on Mac OS X host --- toolchain/eglibc/patches/eglibc-cross.patch | 46 +++++++++++++++++++---------- 1 file changed, 31 insertions(+), 15 deletions(-) (limited to 'toolchain/eglibc') diff --git a/toolchain/eglibc/patches/eglibc-cross.patch b/toolchain/eglibc/patches/eglibc-cross.patch index e2cc86c2e..5e6fd7b74 100644 --- a/toolchain/eglibc/patches/eglibc-cross.patch +++ b/toolchain/eglibc/patches/eglibc-cross.patch @@ -29,21 +29,6 @@ diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_clntout.c eglibc-2.11.1/libc/sunrpc #include "rpc_parse.h" #include "rpc_util.h" #include "proto.h" -diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c eglibc-2.11.1/libc/sunrpc/rpc_main.c ---- eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c 2010-02-24 08:10:00.000000000 +0100 -+++ eglibc-2.11.1/libc/sunrpc/rpc_main.c 2010-03-22 18:31:31.245661003 +0100 -@@ -37,7 +37,11 @@ - #include - #include - #include -+#ifdef _CROSS_RPCGEN_ -+#define gettext(X) (X) -+#else - #include -+#endif - #include - #include - #include diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c eglibc-2.11.1/libc/sunrpc/rpc_scan.c --- eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c 2010-02-24 08:10:00.000000000 +0100 +++ eglibc-2.11.1/libc/sunrpc/rpc_scan.c 2010-03-22 18:31:16.146907097 +0100 @@ -90,3 +75,34 @@ diff -Nur eglibc-2.11.1.orig/libc/timezone/Makefile eglibc-2.11.1/libc/timezone/ $(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs)) gcc $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@ +diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c eglibc-2.11.1/libc/sunrpc/rpc_main.c +--- eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c 2010-02-24 08:10:00.000000000 +0100 ++++ eglibc-2.11.1/libc/sunrpc/rpc_main.c 2010-06-20 13:32:42.000000000 +0200 +@@ -37,7 +37,11 @@ + #include + #include + #include ++#ifdef _CROSS_RPCGEN_ ++#define gettext(X) (X) ++#else + #include ++#endif + #include + #include + #include +@@ -996,10 +1000,12 @@ + abort (); + temp = rindex (cmd->infile, '.'); + cp = stpcpy (mkfilename, "Makefile."); +- if (temp != NULL) +- *((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0'; +- else ++ if (temp != NULL) { ++ strncpy (cp, cmd->infile, temp - cmd->infile); ++ cp[temp - cmd->infile - 1] = '\0'; ++ } else { + stpcpy (cp, cmd->infile); ++ } + + } + else -- cgit v1.2.3