diff options
author | James E Wilson <wilson@specifixinc.com> | 2005-09-29 18:50:56 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2005-09-29 18:50:56 -0700 |
commit | f1dff13a7911d254cc819931122fa60d9cd7bc5a (patch) | |
tree | 8d02f9898ce0920655f3aae6c66e18d99fa69af9 /libmudflap/mf-hooks1.c | |
parent | 07f0879956c74d3ae0db9e83e5b35153979f4da3 (diff) | |
download | gcc-f1dff13a7911d254cc819931122fa60d9cd7bc5a.tar.gz |
We can only wrap mmap if it exists.
* mf-hooks1.c (__mf_0fn_mmap, mmap, __mf_0fn_munmap, munmap): Protect
with HAVE_MMAP ifdef.
From-SVN: r104810
Diffstat (limited to 'libmudflap/mf-hooks1.c')
-rw-r--r-- | libmudflap/mf-hooks1.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libmudflap/mf-hooks1.c b/libmudflap/mf-hooks1.c index a99d7726e9d..bef22687f19 100644 --- a/libmudflap/mf-hooks1.c +++ b/libmudflap/mf-hooks1.c @@ -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 |