aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-01-26 19:49:26 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-01-26 19:49:26 +0000
commitd2d687867cf62c68c48a11de009836d23688c3e2 (patch)
tree4abbc92c60ed1b649d32294267332d834e3dc35f /toolchain
parentb9bd90012a58033d31e72fbd6af90d7276b2d728 (diff)
downloadupstream-d2d687867cf62c68c48a11de009836d23688c3e2.tar.gz
upstream-d2d687867cf62c68c48a11de009836d23688c3e2.tar.bz2
upstream-d2d687867cf62c68c48a11de009836d23688c3e2.zip
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
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/eglibc/patches/2.9/100-darwin_cross.patch14
1 files changed, 14 insertions, 0 deletions
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 <ctype.h>
#include <sys/types.h>
#include <sys/param.h>
+@@ -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 @@