Now __NR_mmap2 is only used for i386. But it is also needed for other archs like ARM and RISCV32. Decide to use it based on the __NR_mmap2 definition as it's not defined on other archs. Currently, this has no effect because other archs use the generic mmap definition from libc. Signed-off-by: Alviro Iskandar Setiawan <alviro.iskandar@xxxxxxxxxxx> --- src/arch/syscall-defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/syscall-defs.h b/src/arch/syscall-defs.h index 9ddac45..374aa0d 100644 --- a/src/arch/syscall-defs.h +++ b/src/arch/syscall-defs.h @@ -27,7 +27,7 @@ static inline void *__sys_mmap(void *addr, size_t length, int prot, int flags, { int nr; -#if defined(__i386__) +#if defined(__NR_mmap2) nr = __NR_mmap2; offset >>= 12; #else -- Alviro Iskandar Setiawan