diff options
author | 2019-12-17 17:25:51 +0000 | |
---|---|---|
committer | 2019-12-17 17:25:51 +0000 | |
commit | d983f9a75cb7bf3ac4a8174836a2525232e37901 (patch) | |
tree | f2c418df05e72c1f5d098b331eacc3f2a8ea63ae | |
parent | Eliminate failure returns from _dl_split_path(): if malloc fails just _dl_oom() (diff) | |
download | wireguard-openbsd-d983f9a75cb7bf3ac4a8174836a2525232e37901.tar.xz wireguard-openbsd-d983f9a75cb7bf3ac4a8174836a2525232e37901.zip |
not renaming those temp files should be fatal
this got fixed in recent binutils, but it's GPLv3.
So do the same thing in a slightly different way
okay guenther@
-rw-r--r-- | gnu/usr.bin/binutils-2.17/binutils/objcopy.c | 6 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/binutils/objcopy.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils-2.17/binutils/objcopy.c b/gnu/usr.bin/binutils-2.17/binutils/objcopy.c index 9ffaabb80c4..9572cae23cf 100644 --- a/gnu/usr.bin/binutils-2.17/binutils/objcopy.c +++ b/gnu/usr.bin/binutils-2.17/binutils/objcopy.c @@ -2627,7 +2627,11 @@ strip_main (int argc, char *argv[]) if (preserve_dates) set_times (tmpname, &statbuf); if (output_file == NULL) - smart_rename (tmpname, argv[i], preserve_dates); + { + int ret = smart_rename (tmpname, argv[i], preserve_dates); + if (ret != 0) + hold_status = ret; + } status = hold_status; } else diff --git a/gnu/usr.bin/binutils/binutils/objcopy.c b/gnu/usr.bin/binutils/binutils/objcopy.c index c3404f773a2..6a161cee240 100644 --- a/gnu/usr.bin/binutils/binutils/objcopy.c +++ b/gnu/usr.bin/binutils/binutils/objcopy.c @@ -2389,7 +2389,11 @@ strip_main (int argc, char *argv[]) if (preserve_dates) set_times (tmpname, &statbuf); if (output_file == NULL) - smart_rename (tmpname, argv[i], preserve_dates); + { + int ret = smart_rename (tmpname, argv[i], preserve_dates); + if (ret != 0) + hold_status = ret; + } status = hold_status; } else |