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 <eswierk@skyportsystems.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
parent
be3bd286bc
commit
480eda2eda
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user