Not all arches implement this, and the kernel doesn't require them to. Add ifdef logic to disable it when not available.
Signed-off-by: Mike Frysinger <vap...@gentoo.org> --- linux-user/syscall.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 799c8e2800ea..a9904fac791f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -290,8 +290,10 @@ _syscall3(int, sys_sched_getaffinity, pid_t, pid, unsigned int, len, #define __NR_sys_sched_setaffinity __NR_sched_setaffinity _syscall3(int, sys_sched_setaffinity, pid_t, pid, unsigned int, len, unsigned long *, user_mask_ptr); +#ifdef TARGET_NR_getcpu #define __NR_sys_getcpu __NR_getcpu _syscall3(int, sys_getcpu, unsigned *, cpu, unsigned *, node, void *, tcache); +#endif _syscall4(int, reboot, int, magic1, int, magic2, unsigned int, cmd, void *, arg); _syscall2(int, capget, struct __user_cap_header_struct *, header, @@ -10595,6 +10597,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, ret = get_errno(sys_sched_setaffinity(arg1, mask_size, mask)); } break; +#ifdef TARGET_NR_getcpu case TARGET_NR_getcpu: { unsigned cpu, node; @@ -10612,6 +10615,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } } break; +#endif case TARGET_NR_sched_setparam: { struct sched_param *target_schp; -- 2.16.1