OSDN Git Service

We can only wrap mmap if it exists.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Sep 2005 01:50:56 +0000 (01:50 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Sep 2005 01:50:56 +0000 (01:50 +0000)
* mf-hooks1.c (__mf_0fn_mmap, mmap, __mf_0fn_munmap, munmap): Protect
with HAVE_MMAP ifdef.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104810 138bc75d-0d04-0410-961f-82ee72b054a4

libmudflap/ChangeLog
libmudflap/mf-hooks1.c

index 12735cb..6c3d219 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-29  James E. Wilson  <wilson@specifix.com>
+
+       * mf-hooks1.c (__mf_0fn_mmap, mmap, __mf_0fn_munmap, munmap): Protect
+       with HAVE_MMAP ifdef.
+
 2005-09-23  Frank Ch. Eigler  <fche@elastic.org>
 
        PR 23084.
index a99d772..bef2268 100644 (file)
@@ -302,6 +302,10 @@ WRAPPER(void, free, void *buf)
 }
 
 
+/* We can only wrap mmap if the target supports it.  Likewise for munmap.
+   We assume we have both if we have mmap.  */
+#ifdef HAVE_MMAP
+
 #if PIC
 /* A special bootstrap variant. */
 void *
@@ -392,6 +396,7 @@ WRAPPER(int , munmap, void *start, size_t length)
     }
   return result;
 }
+#endif /* HAVE_MMAP */
 
 
 /* This wrapper is a little different, as it's called indirectly from