summaryrefslogtreecommitdiff
path: root/binutils-2.24.51.midipix.patch
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-11-26 09:20:06 -0500
committermidipix <writeonce@midipix.org>2015-11-26 09:24:29 -0500
commitf832fd23ae14faffebdd664f11d341d9ccb35c0e (patch)
treeac1549125c5d27cf5877a31b0381f4bfb25feabf /binutils-2.24.51.midipix.patch
parent32dd957cb52c2977ca0507469f6cf922945fa6ea (diff)
downloadchainport-f832fd23ae14faffebdd664f11d341d9ccb35c0e.tar.bz2
chainport-f832fd23ae14faffebdd664f11d341d9ccb35c0e.tar.xz
binutils-2.24.51: updated patch.
+ smart_rename: fallback to simple_copy upon failure. signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information.
Diffstat (limited to 'binutils-2.24.51.midipix.patch')
-rw-r--r--binutils-2.24.51.midipix.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/binutils-2.24.51.midipix.patch b/binutils-2.24.51.midipix.patch
index d4119a8..8fa7400 100644
--- a/binutils-2.24.51.midipix.patch
+++ b/binutils-2.24.51.midipix.patch
@@ -710,3 +710,17 @@ diff -ru a/gas/config/tc-i386.c b/gas/config/tc-i386.c
/* Fix a few things - the dynamic linker expects certain values here,
and we must not disappoint it. */
+--- a/binutils/rename.c 2014-07-03 01:37:22.000000000 -0400
++++ b/binutils/rename.c 2015-11-25 23:13:38.086948592 -0500
+@@ -167,7 +167,10 @@
+ && s.st_nlink == 1)
+ )
+ {
+- ret = rename (from, to);
++ if ((ret = rename (from, to)))
++ if (!(ret = simple_copy (from, to)))
++ unlink (from);
++
+ if (ret == 0)
+ {
+ if (exists)