From d2d687867cf62c68c48a11de009836d23688c3e2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 26 Jan 2009 19:49:26 +0000 Subject: eglibc: replace the use of stpncpy with strncpy + manual termination (stpncpy is not available on darwin) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14212 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- toolchain/eglibc/patches/2.9/100-darwin_cross.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'toolchain/eglibc') diff --git a/toolchain/eglibc/patches/2.9/100-darwin_cross.patch b/toolchain/eglibc/patches/2.9/100-darwin_cross.patch index c149337c39..a9fddb7d01 100644 --- a/toolchain/eglibc/patches/2.9/100-darwin_cross.patch +++ b/toolchain/eglibc/patches/2.9/100-darwin_cross.patch @@ -30,6 +30,20 @@ #include #include #include +@@ -998,9 +1002,10 @@ mkfile_output (struct commandline *cmd) + 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); + + } --- a/libc/sunrpc/rpc_scan.c +++ b/libc/sunrpc/rpc_scan.c @@ -39,7 +39,11 @@ -- cgit v1.2.3