summaryrefslogtreecommitdiff
path: root/toolchain/eglibc
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
commit0232808d148e8b77d551fae6443aacd7e0b0a4cc (patch)
tree40d15f5e8027d8183b0af4a2d1b31031d73f1b0d /toolchain/eglibc
parent15c76887b8fec2bdd038cddc104b4d1a47267ca6 (diff)
downloadmtk-20170518-0232808d148e8b77d551fae6443aacd7e0b0a4cc.zip
mtk-20170518-0232808d148e8b77d551fae6443aacd7e0b0a4cc.tar.gz
mtk-20170518-0232808d148e8b77d551fae6443aacd7e0b0a4cc.tar.bz2
eglibc: replace the use of stpncpy with strncpy + manual termination (stpncpy is not available on darwin)
SVN-Revision: 14212
Diffstat (limited to 'toolchain/eglibc')
-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 c149337..a9fddb7 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 @@