This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Patch]: Fix objdump breakage on systems without mmap
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: Binutils <binutils at sourceware dot org>
- Date: Tue, 19 Jun 2007 12:34:56 +1200
- Subject: [Patch]: Fix objdump breakage on systems without mmap
2007-06-18 Andi Kleen <ak@suse.de>
* objdump.c: Include sys/mman.h
...
(slurp_file): Add.
Breaks systems that don't HAVE_MMAP.
here:
../../src/binutils/objdump.c: In function 'slurp_file':
../../src/binutils/objdump.c:959: error: storage size of 'st' isn't
known
cc1.exe: warnings being treated as errors
../../src/binutils/objdump.c:964: warning: implicit declaration of
function 'fstat'
../../src/binutils/objdump.c:959: warning: unused variable 'st'
This fixes:
2007-06-18 Danny Smith <dannysmith@users.sourceforge.net>
* objdump.c: Include sys/stat.h if !HAVE_MMAP.
*** objdump.c.orig Tue Jun 19 08:33:33 2007
--- objdump.c Tue Jun 19 12:09:49 2007
***************
*** 63,68 ****
--- 63,70 ----
#ifdef HAVE_MMAP
#include <sys/mman.h>
+ #else
+ #include <sys/stat.h>
#endif
/* Internal headers for the ELF .stab-