This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch for mingw-w64 large file support


The mingw-w64 project recently implemented large file support (AKA
"_FILE_OFFSET_BITS=64"). Since then, binutils cannot be built due to a
forward declaration of struct stat.

I created bug #13292 and attached a patch:

Index: bfd/bfd-in.h
RCS file: /cvs/src/src/bfd/bfd-in.h,v
retrieving revision 1.158
diff -u -p -d -r1.158 bfd-in.h
--- bfd/bfd-in.h        16 Sep 2011 01:15:18 -0000      1.158
+++ bfd/bfd-in.h        20 Oct 2011 10:03:32 -0000
@@ -31,6 +31,8 @@ extern "C" {

 #include "ansidecl.h"
 #include "symcat.h"
+#include <sys/stat.h>
 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
 #ifndef SABER
 /* This hack is to avoid a problem with some strict ANSI C preprocessors.
@@ -301,9 +303,6 @@ typedef struct bfd_section *sec_ptr;
    && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE              \
    && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)

-/* Forward define.  */
-struct stat;

 typedef enum bfd_print_symbol

Pau Garcia i Quiles
(Due to my workload, I may need 10 days to answer)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]