support archs with no mlock syscall, only mlock2

This commit is contained in:
Drew DeVault 2019-03-21 11:32:38 -04:00 committed by Rich Felker
parent 59f88d7662
commit 46fb680c85

View File

@ -3,5 +3,9 @@
int mlock(const void *addr, size_t len) int mlock(const void *addr, size_t len)
{ {
#ifdef SYS_mlock
return syscall(SYS_mlock, addr, len); return syscall(SYS_mlock, addr, len);
#else
return syscall(SYS_mlock2, addr, len, 0);
#endif
} }