OLD | NEW |
1 | 1 |
2 #include <errno.h> | 2 #include <errno.h> |
3 #include <sys/mman.h> | 3 #include <sys/mman.h> |
4 | 4 |
5 #include <irt_syscalls.h> | 5 #include <irt_syscalls.h> |
6 | 6 |
7 | 7 |
8 int __munmap (void *start, size_t length) | 8 int __mprotect (void *addr, size_t len, int prot) |
9 { | 9 { |
10 int result = __nacl_irt_munmap (start, length); | 10 int result = __nacl_irt_mprotect (addr, len, prot); |
11 if (result != 0) { | 11 if (result != 0) { |
12 errno = result; | 12 errno = result; |
13 return -1; | 13 return -1; |
14 } | 14 } |
15 return 0; | 15 return 0; |
16 } | 16 } |
17 weak_alias (__munmap, munmap) | 17 weak_alias (__mprotect, mprotect) |
OLD | NEW |