This matches the calling conventions in the Linux kernel and
resolves select() hangs on i386/x86_64 guests.

Signed-off-by: Timothy Pearson <tpear...@raptorengineering.com>
---
 linux-user/syscall.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 2968b57..644a490 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4785,6 +4785,7 @@ static abi_long do_ioctl(int fd, int cmd, abi_long
arg)
     void *argptr;
      ie = ioctl_entries;
+
     for(;;) {
         if (ie->target_cmd == 0) {
             gemu_log("Unsupported ioctl: cmd=0x%04lx\n", (long)cmd);
@@ -7899,7 +7900,7 @@ abi_long do_syscall(void *cpu_env, int num,
abi_long arg1,
         break;
 #if defined(TARGET_NR_select)
     case TARGET_NR_select:
-#if defined(TARGET_S390X) || defined(TARGET_ALPHA)
+#if defined(TARGET_S390X) || defined(TARGET_ALPHA) ||
defined(TARGET_I386) || defined(TARGET_X86_64)
         ret = do_select(arg1, arg2, arg3, arg4, arg5);
 #else
         {
-- 
2.1.4


Reply via email to