diff options
author | Alan Modra <amodra@gmail.com> | 2021-02-05 12:59:16 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-02-05 15:15:14 +1030 |
commit | c0034ac596db89dfb5fa007a63488ad7af555fe9 (patch) | |
tree | 0d91ebf7676fd1da72e0c2b8e090218e812916e6 | |
parent | RISC-V: Removed the v0.93 bitmanip ZBA/ZBB/ZBC instructions. (diff) | |
download | binutils-gdb-c0034ac596db89dfb5fa007a63488ad7af555fe9.tar.gz binutils-gdb-c0034ac596db89dfb5fa007a63488ad7af555fe9.tar.bz2 binutils-gdb-c0034ac596db89dfb5fa007a63488ad7af555fe9.zip |
PR27345, binutils/arsup.c: lstat() not available on all targets
We can just use stat here, the same as is done in ar.c:open_inarch.
PR 27345
* arsup.c (ar_save): Use stat rather than lstat.
(cherry picked from commit c180f095f32ca62f138da9bc7fb96cac0365fb5d)
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/arsup.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index c53a4b5eb1e..a568741661f 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2021-02-05 Alan Modra <amodra@gmail.com> + + PR 27345 + * arsup.c (ar_save): Use stat rather than lstat. + 2021-02-03 Alan Modra <amodra@gmail.com> PR 27270 diff --git a/binutils/arsup.c b/binutils/arsup.c index a60629f6761..fa7706f79e5 100644 --- a/binutils/arsup.c +++ b/binutils/arsup.c @@ -357,7 +357,7 @@ ar_save (void) #endif bfd_close (obfd); - if (lstat (real_name, &target_stat) != 0) + if (stat (real_name, &target_stat) != 0) { /* The temp file created in ar_open has mode 0600 as per mkstemp. Create the real empty output file here so smart_rename will |