From: Ed Swierk Date: Tue, 6 May 2014 03:04:45 +0000 (-0700) Subject: linux-user: Return correct errno for unsupported netlink socket X-Git-Tag: v2.1.0-rc0~52^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=480eda2eda7c464e252f17ac87ec61bccc14f285;p=thirdparty%2Fqemu.git linux-user: Return correct errno for unsupported netlink socket This fixes "Cannot open audit interface - aborting." when the EAFNOSUPPORT errno differs between the target and host architectures (e.g. mips target and x86_64 host). Signed-off-by: Ed Swierk Signed-off-by: Riku Voipio --- diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 840ced1fdad..c134c32d6fd 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1856,7 +1856,7 @@ static abi_long do_socket(int domain, int type, int protocol) } if (domain == PF_NETLINK) - return -EAFNOSUPPORT; /* do not NETLINK socket connections possible */ + return -TARGET_EAFNOSUPPORT; ret = get_errno(socket(domain, type, protocol)); if (ret >= 0) { ret = sock_flags_fixup(ret, target_type);