This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

Fix gdb 7.0 compilation on IRIX 5.3


I just tried to compile gdb 7.0 on IRIX 5.3, but failed initially:

/vol/src/gnu/gdb/gdb-7.0/gdb/dwarf2read.c: In function 'dwarf2_read_section':
/vol/src/gnu/gdb/gdb-7.0/gdb/dwarf2read.c:1402: error: 'MAP_FAILED' undeclared (first use in this function)
/vol/src/gnu/gdb/gdb-7.0/gdb/dwarf2read.c:1402: error: (Each undeclared identifier is reported only once
/vol/src/gnu/gdb/gdb-7.0/gdb/dwarf2read.c:1402: error: for each function it appears in.)
make[2]: *** [dwarf2read.o] Error 1

The following trivial patch fixes this and allowed the build to finish.
Unfortunately, the resulting gdb segfaults when run against itself or
some recent xgcc binary.  I'll investigate and report separately.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2009-11-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* dwarf2read.c [HAVE_MMAP] (MAP_FAILED): Define if missing.

===================================================================
RCS file: gdb/RCS/dwarf2read.c,v
retrieving revision 1.1
diff -up -r1.1 gdb/dwarf2read.c
--- gdb/dwarf2read.c	2009/09/15 16:09:32	1.1
+++ gdb/dwarf2read.c	2009/11/23 18:13:08
@@ -58,6 +58,9 @@
 #endif
 #ifdef HAVE_MMAP
 #include <sys/mman.h>
+#ifndef MAP_FAILED
+#define MAP_FAILED -1
+#endif
 #endif
 
 #if 0


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