diff options
author | Jens Gustedt <Jens.Gustedt@inria.fr> | 2014-09-01 00:46:23 +0200 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-09-06 18:11:24 -0400 |
commit | df7d0dfb9c686df31149d09008ba92834bed9803 (patch) | |
tree | 758743956de08b94514757bda68a628751d0f533 /src/mman | |
parent | 6eb19505bc10eb7964c4863e53ef1028944044f2 (diff) | |
download | musl-df7d0dfb9c686df31149d09008ba92834bed9803.tar.gz musl-df7d0dfb9c686df31149d09008ba92834bed9803.tar.bz2 musl-df7d0dfb9c686df31149d09008ba92834bed9803.tar.xz musl-df7d0dfb9c686df31149d09008ba92834bed9803.zip |
use weak symbols for the POSIX functions that will be used by C threads
The intent of this is to avoid name space pollution of the C threads
implementation.
This has two sides to it. First we have to provide symbols that wouldn't
pollute the name space for the C threads implementation. Second we have
to clean up some internal uses of POSIX functions such that they don't
implicitly drag in such symbols.
Diffstat (limited to 'src/mman')
-rw-r--r-- | src/mman/mprotect.c | 4 |
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); |