]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Revert "Fix a build problem when using FreeBSD 12."
authorNick Clifton <nickc@redhat.com>
Fri, 5 Feb 2021 14:12:24 +0000 (14:12 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 5 Feb 2021 14:12:24 +0000 (14:12 +0000)
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$

binutils/ar.c
binutils/arsup.c
binutils/objcopy.c

index 24ff0920f40e13ec6b3d41f594cd45de2b78b317..40d38c4d8560f4e065575336d08d4c63ebad0a86 100644 (file)
@@ -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
 
index 837011bdfd23bbf4e6ecd8f9e218262318c6d298..107829034c9a20e09640bd790bb55d6e2b431e75 100644 (file)
@@ -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
index a5cead1cf8e602c377fac82f3020c9ba4eb88ac1..404232f778e72542dc1236e46f8ae2a0f0a7780e 100644 (file)
@@ -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;