From: Dmitry V. Levin Date: Wed, 18 Nov 2015 23:18:17 +0000 (+0000) Subject: Assume that libc provides sendmsg X-Git-Tag: v4.11~138 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b36d132907088b878fe77c25a7e8a9c85bf379f0;p=strace Assume that libc provides sendmsg Starting with commit v4.6-281-g7af9f35, we implicitly assume that HAVE_SENDMSG is always defined. Therefore, the check for sendmsg availability is redundant and could be safely removed. * configure.ac (AC_CHECK_FUNCS): Remove sendmsg. * linux/dummy.h [!HAVE_SENDMSG] (sys_recvmsg, sys_sendmsg): Remove stub aliases. * net.c [HAVE_SENDMSG]: Define unconditionally. * syscall.c (dumpio) [HAVE_SENDMSG]: Likewise. --- diff --git a/configure.ac b/configure.ac index 334dd6f3..9a1134e9 100644 --- a/configure.ac +++ b/configure.ac @@ -249,7 +249,6 @@ AC_CHECK_FUNCS(m4_normalize([ preadv process_vm_readv pwritev - sendmsg sendmmsg sigaction signalfd diff --git a/linux/dummy.h b/linux/dummy.h index ca76d0af..356ece2e 100644 --- a/linux/dummy.h +++ b/linux/dummy.h @@ -156,12 +156,6 @@ #define sys_oldolduname printargs #define sys_olduname printargs -/* no library support */ -#ifndef HAVE_SENDMSG -#define sys_recvmsg printargs -#define sys_sendmsg printargs -#endif - /* Who has STREAMS syscalls? * Linux hasn't. Solaris has (had?). * Just in case I miss something, retain in for Sparc. diff --git a/net.c b/net.c index 59cbe93e..74ea37f3 100644 --- a/net.c +++ b/net.c @@ -289,8 +289,7 @@ printsock(struct tcb *tcp, long addr, int addrlen) tprints("}"); } -#ifdef HAVE_SENDMSG -# include "xlat/scmvals.h" +#include "xlat/scmvals.h" #if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 struct cmsghdr32 { @@ -617,7 +616,6 @@ dumpiov_in_mmsghdr(struct tcb *tcp, long addr) } } } -#endif /* HAVE_SENDMSG */ /* * low bits of the socket type define real socket type, @@ -765,8 +763,6 @@ SYS_FUNC(sendto) return RVAL_DECODED; } -#ifdef HAVE_SENDMSG - SYS_FUNC(sendmsg) { printfd(tcp, tcp->u_arg[0]); @@ -797,8 +793,6 @@ SYS_FUNC(sendmmsg) return 0; } -#endif /* HAVE_SENDMSG */ - SYS_FUNC(recv) { if (entering(tcp)) { @@ -851,8 +845,6 @@ SYS_FUNC(recvfrom) return 0; } -#ifdef HAVE_SENDMSG - SYS_FUNC(recvmsg) { if (entering(tcp)) { @@ -913,8 +905,6 @@ SYS_FUNC(recvmmsg) } } -#endif /* HAVE_SENDMSG */ - #include "xlat/shutdown_modes.h" SYS_FUNC(shutdown) diff --git a/syscall.c b/syscall.c index d4599e40..bff00c91 100644 --- a/syscall.c +++ b/syscall.c @@ -695,14 +695,12 @@ dumpio(struct tcb *tcp) case SEN_readv: dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]); return; -#ifdef HAVE_SENDMSG case SEN_recvmsg: dumpiov_in_msghdr(tcp, tcp->u_arg[1]); return; case SEN_recvmmsg: dumpiov_in_mmsghdr(tcp, tcp->u_arg[1]); return; -#endif } } if (qual_flags[tcp->u_arg[0]] & QUAL_WRITE) { @@ -716,14 +714,12 @@ dumpio(struct tcb *tcp) case SEN_writev: dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]); break; -#ifdef HAVE_SENDMSG case SEN_sendmsg: dumpiov_in_msghdr(tcp, tcp->u_arg[1]); break; case SEN_sendmmsg: dumpiov_in_mmsghdr(tcp, tcp->u_arg[1]); break; -#endif } } }