linux-user/syscall.c: fix select on x86_64
PATCH 1/1 linux-user/syscall.c: fix select on x86_64
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 <[email protected]>
--- linux-user/syscall.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
linux-user/syscall.c +5 -3
@@ -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:
Signature · 1 line
1.7.10.4