]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR27345, binutils/arsup.c: lstat() not available on all targets
authorAlan Modra <amodra@gmail.com>
Fri, 5 Feb 2021 02:29:16 +0000 (12:59 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 5 Feb 2021 02:34:29 +0000 (13:04 +1030)
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.

binutils/ChangeLog
binutils/arsup.c

index 79c4609b1a220109a841ead6334bbe003be2975d..dd4d7f13f8bcee1d1d3138b14fdbc9be72d41708 100644 (file)
@@ -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
index a60629f67618f16407cb0f409b9a3e9259013fdb..fa7706f79e502fb5ffc57f8b8e3a97e8480a1752 100644 (file)
@@ -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