Skip to content

Commit a708e76

Browse files
committed
Revert "Fix a build problem when using FreeBSD 12."
This reverts commit b143e2d. Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$
1 parent 97c8a8c commit a708e76

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

binutils/ar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ write_archive (bfd *iarch)
13051305
ofd = dup (ofd);
13061306
if (iarch == NULL || iarch->iostream == NULL)
13071307
skip_stat = TRUE;
1308-
else if (ofd == -1 || fstat (fileno ((FILE *) iarch->iostream), &target_stat) != 0)
1308+
else if (ofd == -1 || fstat (fileno (iarch->iostream), &target_stat) != 0)
13091309
bfd_fatal (old_name);
13101310
#endif
13111311

binutils/arsup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ ar_save (void)
355355
#if !defined (_WIN32) || defined (__CYGWIN32__)
356356
/* It's OK to fail; at worst it will result in SMART_RENAME using a slow
357357
copy fallback to write the output. */
358-
ofd = dup (fileno ((FILE *) obfd->iostream));
358+
ofd = dup (fileno (obfd->iostream));
359359
if (lstat (real_name, &target_stat) != 0)
360360
skip_stat = TRUE;
361361
#endif

binutils/objcopy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3769,7 +3769,7 @@ copy_file (const char *input_filename, const char *output_filename, int ofd,
37693769
/* To allow us to do "strip *" without dying on the first
37703770
non-object file, failures are nonfatal. */
37713771
ibfd = bfd_openr (input_filename, input_target);
3772-
if (ibfd == NULL || fstat (fileno ((FILE *) ibfd->iostream), in_stat) != 0)
3772+
if (ibfd == NULL || fstat (fileno (ibfd->iostream), in_stat) != 0)
37733773
{
37743774
bfd_nonfatal_message (input_filename, NULL, NULL, NULL);
37753775
status = 1;

0 commit comments

Comments
 (0)