summaryrefslogtreecommitdiff
path: root/src/mman/mprotect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mman/mprotect.c')
-rw-r--r--src/mman/mprotect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mman/mprotect.c b/src/mman/mprotect.c
index f488486d..535787b9 100644
--- a/src/mman/mprotect.c
+++ b/src/mman/mprotect.c
@@ -2,10 +2,12 @@
#include "libc.h"
#include "syscall.h"
-int mprotect(void *addr, size_t len, int prot)
+int __mprotect(void *addr, size_t len, int prot)
{
size_t start, end;
start = (size_t)addr & -PAGE_SIZE;
end = (size_t)((char *)addr + len + PAGE_SIZE-1) & -PAGE_SIZE;
return syscall(SYS_mprotect, start, end-start, prot);
}
+
+weak_alias(__mprotect, mprotect);