--- gdb-7.2.50.20110328.orig/gdb/dwarf2read.c 2011-03-30 12:52:20.395450001 +0200 +++ gdb-7.2.50.20110328/gdb/dwarf2read.c 2011-03-30 13:41:55.485450006 +0200 @@ -66,12 +66,14 @@ #ifdef HAVE_ZLIB_H #include #endif +#ifndef __sparc__ #ifdef HAVE_MMAP #include #ifndef MAP_FAILED #define MAP_FAILED ((void *) -1) #endif #endif +#endif typedef struct symbol *symbolp; DEF_VEC_P (symbolp); @@ -1563,6 +1565,7 @@ } } +#ifndef __sparc__ #ifdef HAVE_MMAP if (pagesize == 0) pagesize = getpagesize (); @@ -1589,6 +1592,7 @@ } } #endif +#endif /* If we get here, we are a normal, not-compressed section. */ info->buffer = buf @@ -15439,6 +15443,7 @@ { if (info->was_mmapped) { +#ifndef __sparc__ #ifdef HAVE_MMAP intptr_t begin = (intptr_t) info->buffer; intptr_t map_begin = begin & ~(pagesize - 1); @@ -15449,6 +15454,7 @@ /* Without HAVE_MMAP, we should never be here to begin with. */ gdb_assert_not_reached ("no mmap support"); #endif +#endif } }