diff options
author | John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | 2015-12-24 19:59:59 +0100 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2016-01-11 14:54:03 +0200 |
commit | 5a53dc5042d9250f2011e54cd065ed360e34d2ac (patch) | |
tree | 48ebe6130b2513dc2f0fb5ff05f75eb1ae72c8a3 /linux-user | |
parent | e73eecbdc278970f6d829951293efc2167b6a4c5 (diff) | |
download | qemu-5a53dc5042d9250f2011e54cd065ed360e34d2ac.zip qemu-5a53dc5042d9250f2011e54cd065ed360e34d2ac.tar.gz qemu-5a53dc5042d9250f2011e54cd065ed360e34d2ac.tar.bz2 |
linux-user: Add SOCKOP_sendmmsg and SOCKOP_recvmmsg socket call, wire them up.
Adds the definitions for the socket calls SOCKOP_sendmmsg
and SOCKOP_recvmmsg and wires them up with the rest of the code.
The necessary function do_sendrecvmmsg() is already present in
linux-user/syscall.c. After adding these two definitions and wiring
them up, I no longer receive an error message about the
unimplemented socket calls when running "apt-get update" on Debian
unstable running on qemu with glibc_2.21 on m68k.
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/syscall.c | 8 | ||||
-rw-r--r-- | linux-user/syscall_defs.h | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 11b72e1..0cbace4 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2272,7 +2272,6 @@ static abi_long do_sendrecvmsg(int fd, abi_ulong target_msg, return ret; } -#ifdef TARGET_NR_sendmmsg /* We don't rely on the C library to have sendmmsg/recvmmsg support, * so it might not have this *mmsg-specific flag either. */ @@ -2319,7 +2318,6 @@ static abi_long do_sendrecvmmsg(int fd, abi_ulong target_msgvec, } return ret; } -#endif /* If we don't have a system accept4() then just call accept. * The callsites to do_accept4() will ensure that they don't @@ -2542,6 +2540,8 @@ static abi_long do_socketcall(int num, abi_ulong vptr) [SOCKOP_shutdown] = 2, /* sockfd, how */ [SOCKOP_sendmsg] = 3, /* sockfd, msg, flags */ [SOCKOP_recvmsg] = 3, /* sockfd, msg, flags */ + [SOCKOP_sendmmsg] = 4, /* sockfd, msgvec, vlen, flags */ + [SOCKOP_recvmmsg] = 4, /* sockfd, msgvec, vlen, flags */ [SOCKOP_setsockopt] = 5, /* sockfd, level, optname, optval, optlen */ [SOCKOP_getsockopt] = 5, /* sockfd, level, optname, optval, optlen */ }; @@ -2592,6 +2592,10 @@ static abi_long do_socketcall(int num, abi_ulong vptr) return do_sendrecvmsg(a[0], a[1], a[2], 1); case SOCKOP_recvmsg: /* sockfd, msg, flags */ return do_sendrecvmsg(a[0], a[1], a[2], 0); + case SOCKOP_sendmmsg: /* sockfd, msgvec, vlen, flags */ + return do_sendrecvmmsg(a[0], a[1], a[2], a[3], 1); + case SOCKOP_recvmmsg: /* sockfd, msgvec, vlen, flags */ + return do_sendrecvmmsg(a[0], a[1], a[2], a[3], 0); case SOCKOP_setsockopt: /* sockfd, level, optname, optval, optlen */ return do_setsockopt(a[0], a[1], a[2], a[3], a[4]); case SOCKOP_getsockopt: /* sockfd, level, optname, optval, optlen */ diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 2fd4aff..9e2b3c2 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -28,6 +28,8 @@ #define SOCKOP_sendmsg 16 #define SOCKOP_recvmsg 17 #define SOCKOP_accept4 18 +#define SOCKOP_recvmmsg 19 +#define SOCKOP_sendmmsg 20 #define IPCOP_semop 1 #define IPCOP_semget 2 |