diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-12-11 13:27:45 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-12-11 13:27:45 +0000 |
commit | b143e2d506bee1020752597f979d5af174edc36d (patch) | |
tree | 114aeb82fc29dc239624f8cc4d9ef2dd41e34603 /binutils | |
parent | 9cd7a95a2bb9ba9d5a6af022e5454c8ce78aee56 (diff) | |
download | gdb-b143e2d506bee1020752597f979d5af174edc36d.zip gdb-b143e2d506bee1020752597f979d5af174edc36d.tar.gz gdb-b143e2d506bee1020752597f979d5af174edc36d.tar.bz2 |
Fix a build problem when using FreeBSD 12.
* ar.c (write_archive): Cast iostream pointer to FILE *.
* arsup.c (ar_save): Likewise.
* objcopy.c (copy_file): Likewise.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/ar.c | 2 | ||||
-rw-r--r-- | binutils/arsup.c | 2 | ||||
-rw-r--r-- | binutils/objcopy.c | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index d139b13..ace5977 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2020-12-11 Sebastian Huber <sebastian.huber@embedded-brains.de> + + * ar.c (write_archive): Cast iostream pointer to FILE *. + * arsup.c (ar_save): Likewise. + * objcopy.c (copy_file): Likewise. + 2020-12-07 Nick Clifton <nickc@redhat.com> * objcopy.c (is_mergeable_note_section): Remove reference to diff --git a/binutils/ar.c b/binutils/ar.c index 6598dd9..8329223 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 (iarch->iostream), &target_stat) != 0) + else if (ofd == -1 || fstat (fileno ((FILE *) iarch->iostream), &target_stat) != 0) bfd_fatal (old_name); #endif diff --git a/binutils/arsup.c b/binutils/arsup.c index 8b4437f..dad4174 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 (obfd->iostream)); + ofd = dup (fileno ((FILE *) obfd->iostream)); if (lstat (real_name, &target_stat) != 0) skip_stat = TRUE; #endif diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 06ecf3e..0ea3ea1 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -3745,7 +3745,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 (ibfd->iostream), in_stat) != 0) + if (ibfd == NULL || fstat (fileno ((FILE *) ibfd->iostream), in_stat) != 0) { bfd_nonfatal_message (input_filename, NULL, NULL, NULL); status = 1; |