diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-01-26 19:49:26 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-01-26 19:49:26 +0000 |
commit | 3d494a38261faa82160061038ba291f579239b3b (patch) | |
tree | 4abbc92c60ed1b649d32294267332d834e3dc35f /toolchain/eglibc/patches/2.9/100-darwin_cross.patch | |
parent | e8baf33f7be9a008d7cf53bea962206a5a53ed75 (diff) |
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/eglibc/patches/2.9/100-darwin_cross.patch')
-rw-r--r-- | toolchain/eglibc/patches/2.9/100-darwin_cross.patch | 14 |
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 @@ |