Use the correct argument passing convention for select on x86_64. Previously, select worked for i386 but was broken for x86_64 (always returning EINVAL). With this change, select works on both i386 and x86_64. (Other targets untested but should be unaffected.)
Signed-off-by: Nickolai Zeldovich <nicko...@csail.mit.edu> --- linux-user/syscall.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e99adab..5a81d9f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6213,7 +6213,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, ret = get_errno(settimeofday(&tv, NULL)); } break; -#if defined(TARGET_NR_select) && !defined(TARGET_S390X) && !defined(TARGET_S390) +#if defined(TARGET_NR_select) && !defined(TARGET_S390X) \ + && !defined(TARGET_S390) && !defined(TARGET_X86_64) case TARGET_NR_select: { struct target_sel_arg_struct *sel; @@ -7153,8 +7154,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } break; #endif /* TARGET_NR_getdents64 */ -#if defined(TARGET_NR__newselect) || defined(TARGET_S390X) -#ifdef TARGET_S390X +#if defined(TARGET_NR__newselect) || defined(TARGET_S390X) \ + || defined(TARGET_X86_64) +#if defined(TARGET_S390X) || defined(TARGET_X86_64) case TARGET_NR_select: #else case TARGET_NR__newselect: -- 1.7.10.4