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
This commit is contained in:
James E Wilson 2005-09-29 18:50:56 -07:00 committed by Jim Wilson
parent 07f0879956
commit f1dff13a79
2 changed files with 10 additions and 0 deletions

View 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.

View 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