diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-03-21 11:32:38 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2019-03-21 21:15:56 -0400 |
commit | 46fb680c850b0846af6a7f789404077368d60c79 (patch) | |
tree | 290e9fe1444a9e11079d3eaebeb26361a354decd | |
parent | 59f88d766263344ce3e124d969ba66720aff4590 (diff) | |
download | musl-46fb680c850b0846af6a7f789404077368d60c79.tar.gz musl-46fb680c850b0846af6a7f789404077368d60c79.tar.xz musl-46fb680c850b0846af6a7f789404077368d60c79.zip |
support archs with no mlock syscall, only mlock2
-rw-r--r-- | src/mman/mlock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mman/mlock.c b/src/mman/mlock.c index e683a44a..71af582f 100644 --- a/src/mman/mlock.c +++ b/src/mman/mlock.c @@ -3,5 +3,9 @@ int mlock(const void *addr, size_t len) { +#ifdef SYS_mlock return syscall(SYS_mlock, addr, len); +#else + return syscall(SYS_mlock2, addr, len, 0); +#endif } |