Blame SOURCES/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch

01917d
Index: gdb-7.5.50.20130118/gdb/gdb_bfd.c
01917d
===================================================================
01917d
--- gdb-7.5.50.20130118.orig/gdb/gdb_bfd.c	2013-01-18 23:11:18.158718709 +0100
01917d
+++ gdb-7.5.50.20130118/gdb/gdb_bfd.c	2013-01-18 23:12:06.841787893 +0100
01917d
@@ -27,12 +27,14 @@
01917d
 #ifdef HAVE_ZLIB_H
01917d
 #include <zlib.h>
01917d
 #endif
01917d
+#ifndef __sparc__
01917d
 #ifdef HAVE_MMAP
01917d
 #include <sys/mman.h>
01917d
 #ifndef MAP_FAILED
01917d
 #define MAP_FAILED ((void *) -1)
01917d
 #endif
01917d
 #endif
01917d
+#endif
01917d
 
01917d
 /* An object of this type is stored in the section's user data when
01917d
    mapping a section.  */
01917d
@@ -205,6 +207,7 @@ free_one_bfd_section (bfd *abfd, asectio
01917d
 
01917d
   if (sect != NULL && sect->data != NULL)
01917d
     {
01917d
+#ifndef __sparc__
01917d
 #ifdef HAVE_MMAP
01917d
       if (sect->map_addr != NULL)
01917d
 	{
01917d
@@ -215,6 +218,7 @@ free_one_bfd_section (bfd *abfd, asectio
01917d
 	}
01917d
       else
01917d
 #endif
01917d
+#endif
01917d
 	xfree (sect->data);
01917d
     }
01917d
 }
01917d
@@ -360,6 +364,7 @@ gdb_bfd_map_section (asection *sectp, bf
01917d
   if (descriptor->data != NULL)
01917d
     goto done;
01917d
 
01917d
+#ifndef __sparc__
01917d
 #ifdef HAVE_MMAP
01917d
   if (!bfd_is_section_compressed (abfd, sectp))
01917d
     {
01917d
@@ -394,6 +399,7 @@ gdb_bfd_map_section (asection *sectp, bf
01917d
 	}
01917d
     }
01917d
 #endif /* HAVE_MMAP */
01917d
+#endif
01917d
 
01917d
   /* Handle compressed sections, or ordinary uncompressed sections in
01917d
      the no-mmap case.  */