]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
We can only wrap mmap if it exists.
authorJames E Wilson <wilson@specifixinc.com>
Fri, 30 Sep 2005 01:50:56 +0000 (18:50 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 30 Sep 2005 01:50:56 +0000 (18:50 -0700)
* mf-hooks1.c (__mf_0fn_mmap, mmap, __mf_0fn_munmap, munmap): Protect
with HAVE_MMAP ifdef.

From-SVN: r104810

libmudflap/ChangeLog
libmudflap/mf-hooks1.c

index 12735cb90f468a91b09de0836fb317fbef10ad14..6c3d219bfcfef89e219f9cbf46db210a60bfb5d9 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 a99d7726e9da119cdd222bfcd283577cc71c64e3..bef22687f195e162176690dc3025cddb5632958c 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