From f43f98223204f6be26c17572d299aca763c2b26b Mon Sep 17 00:00:00 2001 From: Chao-Ying Fu Date: Mon, 20 Aug 2012 16:02:41 -0700 Subject: [PATCH] Support mprotect. Change-Id: Ic786eb35f69d44379129faec02b1023ab2c3282a --- ndk/sources/android/libportable/arch-mips/mmap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ndk/sources/android/libportable/arch-mips/mmap.c b/ndk/sources/android/libportable/arch-mips/mmap.c index 4f83bdb8b..d165e2b3e 100644 --- a/ndk/sources/android/libportable/arch-mips/mmap.c +++ b/ndk/sources/android/libportable/arch-mips/mmap.c @@ -85,3 +85,9 @@ void *mmap_portable(void *addr, size_t size, int prot, int flags, int fd, long o return ret; } + +extern int mprotect(const void *, size_t, int); +int mprotect_portable(const void *addr, size_t size, int prot) +{ + return mprotect(addr, size, mips_change_prot(prot)); +}