patches/binutils/2.22/500-fix-struct-stat.patch
author Titus von Boxberg <titus@v9g.de>
Tue Nov 06 17:42:39 2012 +0100 (2012-11-06)
changeset 3116 f7a40ba0b651
permissions -rw-r--r--
binutils/binutils: do not fwd declare struct stat (2.22).

For canadian cross to host i686-mingw32 fwd declaring
struct stat is not possible.
Instead #include <sys/stat.h>

Signed-off-by: Titus von Boxberg <titus@v9g.de>
Message-Id: <417a15d4277913841ddd.1353100974@tschetwerikow.boxberg.lan>
Patchwork-Id: 199733
     1 diff -ur binutils-2.22.org/bfd/bfd-in2.h binutils-2.22/bfd/bfd-in2.h
     2 --- binutils-2.22.org/bfd/bfd-in2.h	2011-09-16 03:15:18.000000000 +0200
     3 +++ binutils-2.22/bfd/bfd-in2.h	2012-11-03 18:25:20.365668349 +0100
     4 @@ -32,6 +32,8 @@
     5  #ifndef __BFD_H_SEEN__
     6  #define __BFD_H_SEEN__
     7  
     8 +#include <sys/stat.h>
     9 +
    10  #ifdef __cplusplus
    11  extern "C" {
    12  #endif
    13 @@ -308,8 +310,6 @@
    14     && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE		\
    15     && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
    16  
    17 -/* Forward define.  */
    18 -struct stat;
    19  
    20  typedef enum bfd_print_symbol
    21  {
    22 diff -ur binutils-2.22.org/bfd/bfd-in.h binutils-2.22/bfd/bfd-in.h
    23 --- binutils-2.22.org/bfd/bfd-in.h	2011-09-16 03:15:18.000000000 +0200
    24 +++ binutils-2.22/bfd/bfd-in.h	2012-11-03 18:24:43.397783645 +0100
    25 @@ -25,6 +25,8 @@
    26  #ifndef __BFD_H_SEEN__
    27  #define __BFD_H_SEEN__
    28  
    29 +#include <sys/stat.h>
    30 +
    31  #ifdef __cplusplus
    32  extern "C" {
    33  #endif
    34 @@ -301,8 +303,6 @@
    35     && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE		\
    36     && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
    37  
    38 -/* Forward define.  */
    39 -struct stat;
    40  
    41  typedef enum bfd_print_symbol
    42  {