[Patch]: Fix objdump breakage on systems without mmap
Danny Smith
dannysmith@clear.net.nz
Tue Jun 19 00:34:00 GMT 2007
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-
More information about the Binutils
mailing list