aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2021-02-05 14:12:24 +0000
committerNick Clifton <nickc@redhat.com>2021-02-05 14:12:24 +0000
commita708e764423943cebe2b355ee09a98864d50cef1 (patch)
tree2453a0c8da60b286a14e4567e2af9898031a13a6
parent97c8a8cc3f72ffadec511013d9a2f5f853f84887 (diff)
downloadfsf-binutils-gdb-a708e764423943cebe2b355ee09a98864d50cef1.zip
fsf-binutils-gdb-a708e764423943cebe2b355ee09a98864d50cef1.tar.gz
fsf-binutils-gdb-a708e764423943cebe2b355ee09a98864d50cef1.tar.bz2
Revert "Fix a build problem when using FreeBSD 12."
This reverts commit b143e2d506bee1020752597f979d5af174edc36d. Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$
-rw-r--r--binutils/ar.c2
-rw-r--r--binutils/arsup.c2
-rw-r--r--binutils/objcopy.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/binutils/ar.c b/binutils/ar.c
index 24ff092..40d38c4 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -1305,7 +1305,7 @@ write_archive (bfd *iarch)
ofd = dup (ofd);
if (iarch == NULL || iarch->iostream == NULL)
skip_stat = TRUE;
- else if (ofd == -1 || fstat (fileno ((FILE *) iarch->iostream), &target_stat) != 0)
+ else if (ofd == -1 || fstat (fileno (iarch->iostream), &target_stat) != 0)
bfd_fatal (old_name);
#endif
diff --git a/binutils/arsup.c b/binutils/arsup.c
index 837011b..1078290 100644
--- a/binutils/arsup.c
+++ b/binutils/arsup.c
@@ -355,7 +355,7 @@ ar_save (void)
#if !defined (_WIN32) || defined (__CYGWIN32__)
/* It's OK to fail; at worst it will result in SMART_RENAME using a slow
copy fallback to write the output. */
- ofd = dup (fileno ((FILE *) obfd->iostream));
+ ofd = dup (fileno (obfd->iostream));
if (lstat (real_name, &target_stat) != 0)
skip_stat = TRUE;
#endif
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index a5cead1..404232f 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -3769,7 +3769,7 @@ copy_file (const char *input_filename, const char *output_filename, int ofd,
/* To allow us to do "strip *" without dying on the first
non-object file, failures are nonfatal. */
ibfd = bfd_openr (input_filename, input_target);
- if (ibfd == NULL || fstat (fileno ((FILE *) ibfd->iostream), in_stat) != 0)
+ if (ibfd == NULL || fstat (fileno (ibfd->iostream), in_stat) != 0)
{
bfd_nonfatal_message (input_filename, NULL, NULL, NULL);
status = 1;