summaryrefslogtreecommitdiffstats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorEd Swierk2014-05-06 05:04:45 +0200
committerRiku Voipio2014-06-17 08:21:41 +0200
commit480eda2eda7c464e252f17ac87ec61bccc14f285 (patch)
treeeb0857a949231fb25f3facf3064a5c9f41ebd0ac /linux-user/syscall.c
parentlinux-user: Don't overrun guest buffer in sched_getaffinity (diff)
downloadqemu-480eda2eda7c464e252f17ac87ec61bccc14f285.tar.gz
qemu-480eda2eda7c464e252f17ac87ec61bccc14f285.tar.xz
qemu-480eda2eda7c464e252f17ac87ec61bccc14f285.zip
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>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 840ced1fda..c134c32d6f 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);