提交 364702f7 编写于 作者: W Willy Tarreau 提交者: Paul E. McKenney

tools/nolibc: make sys_mmap() automatically use the right __NR_mmap definition

__NR_mmap2 was used for i386 but it's also needed for other archs such
as RISCV32 or ARM. Let's decide to use it based on the __NR_mmap2
definition as it's not defined on other archs.
Signed-off-by: NWilly Tarreau <w@1wt.eu>
Signed-off-by: NPaul E. McKenney <paulmck@kernel.org>
上级 8b53e83b
......@@ -697,7 +697,7 @@ void *sys_mmap(void *addr, size_t length, int prot, int flags, int fd,
int n;
#if defined(__i386__)
#if defined(__NR_mmap2)
n = __NR_mmap2;
offset >>= 12;
#else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册