Removed dependency on <sys/mman.h> by using our own versions of
mmap/munmap. Required making VG_(munmap_native) public.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3951 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_libcmman.c b/coregrind/m_libcmman.c
index a39d472..3499fe5 100644
--- a/coregrind/m_libcmman.c
+++ b/coregrind/m_libcmman.c
@@ -103,7 +103,7 @@
return res.isError ? (void*)-1 : (void*)res.val;
}
-static SysRes munmap_native(void *start, SizeT length)
+SysRes VG_(munmap_native)(void *start, SizeT length)
{
return VG_(do_syscall2)(__NR_munmap, (UWord)start, length );
}
@@ -111,7 +111,7 @@
/* Returns -1 on failure. */
Int VG_(munmap)( void* start, SizeT length )
{
- SysRes res = munmap_native(start, length);
+ SysRes res = VG_(munmap_native)(start, length);
if (!res.isError) {
VG_(unmap_range)((Addr)start, length);
return 0;