diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-30 01:50:56 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-30 01:50:56 +0000 |
commit | acf503a40b378589b5a392d17c79ec407f46c7bf (patch) | |
tree | 8d02f9898ce0920655f3aae6c66e18d99fa69af9 /libmudflap | |
parent | 55c72ac40c648560636fa26fd2326d16a5c6bd5d (diff) | |
download | gcc-acf503a40b378589b5a392d17c79ec407f46c7bf.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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104810 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap')
-rw-r--r-- | libmudflap/ChangeLog | 5 | ||||
-rw-r--r-- | libmudflap/mf-hooks1.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index 12735cb90f4..6c3d219bfcf 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -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. 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 |