This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Patch for mingw-w64 large file support
- From: Pau Garcia i Quiles <pgquiles at elpauer dot org>
- To: binutils at sourceware dot org
- Date: Mon, 24 Oct 2011 11:53:19 +0200
- Subject: Patch for mingw-w64 large file support
Hi,
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:
http://www.sourceware.org/bugzilla/show_bug.cgi?id=13292
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
{
bfd_print_symbol_name,
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)