Commit b9d36eb2 authored by André Hentschel's avatar André Hentschel Committed by Riku Voipio

linux-user: Support the accept4 socketcall

Cc: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: default avatarAndré Hentschel <nerv@dawncrow.de>
Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Reviewed-by: default avatarErik de Castro Lopo <erikd@mega-nerd.com>
Reviewed-by: default avatarLaurent Vivier <laurent@vivier.eu>
Signed-off-by: default avatarRiku Voipio <riku.voipio@linaro.org>
parent 1d327fb4
......@@ -2245,6 +2245,22 @@ static abi_long do_socketcall(int num, abi_ulong vptr)
ret = do_accept4(sockfd, target_addr, target_addrlen, 0);
}
break;
case SOCKOP_accept4:
{
abi_ulong sockfd;
abi_ulong target_addr, target_addrlen;
abi_ulong flags;
if (get_user_ual(sockfd, vptr)
|| get_user_ual(target_addr, vptr + n)
|| get_user_ual(target_addrlen, vptr + 2 * n)
|| get_user_ual(flags, vptr + 3 * n)) {
return -TARGET_EFAULT;
}
ret = do_accept4(sockfd, target_addr, target_addrlen, flags);
}
break;
case SOCKOP_getsockname:
{
abi_ulong sockfd;
......
......@@ -27,6 +27,7 @@
#define SOCKOP_getsockopt 15
#define SOCKOP_sendmsg 16
#define SOCKOP_recvmsg 17
#define SOCKOP_accept4 18
#define IPCOP_semop 1
#define IPCOP_semget 2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment