0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-28 16:15:23 +08:00

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.
This commit is contained in:
twwlogin 2014-03-21 01:32:01 -05:00
parent c217ab73b1
commit b7a663f1c1

View File

@ -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<char *> (malloc(a_[i].iov_len));
if (unlikely (!a_[i].iov_base)) {
errno = ENOMEM;
return -1;