Skip to content

Commit c0034ac

Browse files
committed
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 c180f09)
1 parent faca03e commit c0034ac

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

binutils/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2021-02-05 Alan Modra <amodra@gmail.com>
2+
3+
PR 27345
4+
* arsup.c (ar_save): Use stat rather than lstat.
5+
16
2021-02-03 Alan Modra <amodra@gmail.com>
27

38
PR 27270

binutils/arsup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ ar_save (void)
357357
#endif
358358
bfd_close (obfd);
359359

360-
if (lstat (real_name, &target_stat) != 0)
360+
if (stat (real_name, &target_stat) != 0)
361361
{
362362
/* The temp file created in ar_open has mode 0600 as per mkstemp.
363363
Create the real empty output file here so smart_rename will

0 commit comments

Comments
 (0)