getsockopt() errno
PATCH 1/1 getsockopt() errno
linux-user getsockopt() doesn't return the correct errnos for certain cases. This fixes errnos for unsupported levels and unsupported SOL_IP option names.
linux-user/syscall.c +3 -2
@@ -1010,14 +1010,15 @@ }break ;default : - goto unimplemented; + ret = -TARGET_ENOPROTOOPT ; +break ; }break ;default : unimplemented:gemu_log ("getsockopt level=%d optname=%d not yet supported\n" , level, optname); - ret = -TARGET_ENOSYS ; + ret = -TARGET_EOPNOTSUPP ;break ; }return ret;