aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/arsup.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 79c4609..dd4d7f1 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 a60629f..fa7706f 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