]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR27382, build failure if fileno() is a macro
authorAlan Modra <amodra@gmail.com>
Tue, 9 Feb 2021 03:02:36 +0000 (13:32 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 9 Feb 2021 03:07:59 +0000 (13:37 +1030)
PR 27382
* objcopy.c (copy_file): Use bfd_stat.

binutils/ChangeLog
binutils/objcopy.c

index 8b08bd0db7908e46542cd3762c9fa84217b9ab03..b60e55d163243564117131056a9071d4fe022752 100644 (file)
@@ -1,3 +1,8 @@
+2021-02-09  Alan Modra  <amodra@gmail.com>
+
+       PR 27382
+       * objcopy.c (copy_file): Use bfd_stat.
+
 2021-02-06  Nick Clifton  <nickc@redhat.com>
 
        This is the 2.36.1 release.
index 00d751522c4d1fbdc894fe9a64e7f5500e6960fb..eab3b6db5857731cec24dbf395d69ffba8b2590b 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 (ibfd->iostream), in_stat) != 0)
+  if (ibfd == NULL || bfd_stat (ibfd, in_stat) != 0)
     {
       bfd_nonfatal_message (input_filename, NULL, NULL, NULL);
       status = 1;