summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-12-10 08:16:53 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-12-10 08:16:53 +0100
commite5899b84480c46c3ba5d7d24a97d9bc63d7baa7c (patch)
treed85edbd0b20a43ae1193b8e43aa655b0b4d0833a
parentd344002876675e8a77f4d93303b8c2448fe02489 (diff)
downloadsocket_wrapper-e5899b84480c46c3ba5d7d24a97d9bc63d7baa7c.tar.gz
socket_wrapper-e5899b84480c46c3ba5d7d24a97d9bc63d7baa7c.tar.xz
socket_wrapper-e5899b84480c46c3ba5d7d24a97d9bc63d7baa7c.zip
swrap: Add libc_writev().
-rw-r--r--src/socket_wrapper.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index e298c31..f2fa8ce 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -765,6 +765,13 @@ static int libc_socket(int domain, int type, int protocol)
return swrap.fns.libc_socket(domain, type, protocol);
}
+static ssize_t libc_writev(int fd, const struct iovec *iov, int iovcnt)
+{
+ swrap_load_lib_function(SWRAP_LIBSOCKET, writev);
+
+ return swrap.fns.libc_writev(fd, iov, iovcnt);
+}
+
/*********************************************************
* SWRAP HELPER FUNCTIONS
*********************************************************/
@@ -3356,7 +3363,7 @@ static ssize_t swrap_writev(int s, const struct iovec *vector, int count)
struct socket_info *si = find_socket_info(s);
if (!si) {
- return swrap.fns.libc_writev(s, vector, count);
+ return libc_writev(s, vector, count);
}
tmp.iov_base = NULL;
@@ -3376,7 +3383,7 @@ static ssize_t swrap_writev(int s, const struct iovec *vector, int count)
ret = swrap_sendmsg_before(s, si, &msg, &tmp, &un_addr, NULL, NULL, NULL);
if (ret == -1) return -1;
- ret = swrap.fns.libc_writev(s, msg.msg_iov, msg.msg_iovlen);
+ ret = libc_writev(s, msg.msg_iov, msg.msg_iovlen);
swrap_sendmsg_after(si, &msg, NULL, ret);