linux-user setsockopt() doesn't return the correct errno for certain
cases.  This fixes errno for unsupported levels.  It's similar to the
bug in getsockopt().
Index: qemu/linux-user/syscall.c
===================================================================
--- qemu.orig/linux-user/syscall.c	2007-12-12 22:26:51.000000000 -0700
+++ qemu/linux-user/syscall.c	2007-12-12 22:27:41.000000000 -0700
@@ -920,7 +920,7 @@
     default:
     unimplemented:
         gemu_log("Unsupported setsockopt level=%d optname=%d \n", level, optname);
-        ret = -TARGET_ENOSYS;
+        ret = -TARGET_ENOPROTOOPT;
     }
     return ret;
 }

Reply via email to