fix errno for posix_openpt with no free ptys available
[musl.git] / src / linux / mlock2.c
blob10132742d0605f262646d708512476496c212fb8
1 #define _GNU_SOURCE 1
2 #include <sys/mman.h>
3 #include "syscall.h"
5 int mlock2(const void *addr, size_t len, unsigned flags)
7 if (flags == 0)
8 return mlock(addr, len);
9 return syscall(SYS_mlock2, addr, len, flags);