From b7a663f1c1dc0f16a878595858d4286991cf7152 Mon Sep 17 00:00:00 2001 From: twwlogin Date: Fri, 21 Mar 2014 01:32:01 -0500 Subject: [PATCH] Allow iov_base as char * on Solaris 8/9/10. On Solaris 8, 9, 10/SPARC, iov_base is of type caddr_t which is char *. The Sun C++ compiler errors with "Cannot assign void* to char*". Using a static case to override this. On Solaris 11, HP-UX, AIX, and RHEL, iov_base is void * so no issues there. This seems a rather hackish solution so open to something better. --- src/zmq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zmq.cpp b/src/zmq.cpp index efb8004b..c031fe54 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -533,7 +533,7 @@ int zmq_recviov (void *s_, iovec *a_, size_t *count_, int flags_) } a_[i].iov_len = zmq_msg_size (&msg); - a_[i].iov_base = malloc(a_[i].iov_len); + a_[i].iov_base = static_cast (malloc(a_[i].iov_len)); if (unlikely (!a_[i].iov_base)) { errno = ENOMEM; return -1;