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

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