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.
This commit is contained in:
Alan Modra 2021-02-05 12:59:16 +10:30
parent 04b4939b03
commit c180f095f3
2 changed files with 6 additions and 1 deletions

View 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

View 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