28 lines
878 B
Diff
28 lines
878 B
Diff
From c180f095f32ca62f138da9bc7fb96cac0365fb5d Mon Sep 17 00:00:00 2001
|
|
From: Alan Modra <amodra@gmail.com>
|
|
Date: Fri, 5 Feb 2021 12:59:16 +1030
|
|
Subject: [PATCH] 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.
|
|
---
|
|
binutils/arsup.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/binutils/arsup.c b/binutils/arsup.c
|
|
index a60629f67618..fa7706f79e50 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
|