From f85737bf295e3a121384b6ef194a4b121b302f16 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 24 Sep 2015 09:30:00 +0200 Subject: [PATCH] Fixed const warning in lwip_writev --- src/api/sockets.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/sockets.c b/src/api/sockets.c index 01c8ad9b..29998787 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -1278,7 +1278,9 @@ lwip_writev(int s, const struct iovec *iov, int iovcnt) msg.msg_name = NULL; msg.msg_namelen = 0; - msg.msg_iov = (struct iovec *)iov; + /* Hack: we have to cast via number to cast from 'const' pointer to non-const. + Blame the opengroup standard for this inconsistency. */ + msg.msg_iov = (struct iovec *)(size_t)iov; msg.msg_iovlen = iovcnt; msg.msg_control = NULL; msg.msg_controllen = 0;