Index: descriptor_ops.hpp =================================================================== --- descriptor_ops.hpp (revision 48518) +++ descriptor_ops.hpp (working copy) @@ -63,14 +63,24 @@ inline void init_buf(buf& b, void* data, size_t size) { +#if (defined(sun) || defined(__sun)) && defined(__SUNPRO_CC) + b.iov_base = static_cast(data); + b.iov_len = size; +#else // (defined(sun) || defined(__sun)) && defined(__SUNPRO_CC) b.iov_base = data; b.iov_len = size; +#endif } inline void init_buf(buf& b, const void* data, size_t size) { +#if (defined(sun) || defined(__sun)) && defined(__SUNPRO_CC) + b.iov_base = static_cast(const_cast(data)); + b.iov_len = size; +#else // (defined(sun) || defined(__sun)) && defined(__SUNPRO_CC) b.iov_base = const_cast(data); b.iov_len = size; +#endif } inline int scatter_read(int d, buf* bufs, size_t count, Index: socket_ops.hpp =================================================================== --- socket_ops.hpp (revision 48518) +++ socket_ops.hpp (working copy) @@ -214,6 +214,9 @@ #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) b.buf = static_cast(data); b.len = static_cast(size); +#elif (defined(sun) || defined(__sun)) && defined(__SUNPRO_CC) + b.iov_base = static_cast(data); + b.iov_len = size; #else // defined(BOOST_WINDOWS) || defined(__CYGWIN__) b.iov_base = data; b.iov_len = size; @@ -225,6 +228,9 @@ #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) b.buf = static_cast(const_cast(data)); b.len = static_cast(size); +#elif (defined(sun) || defined(__sun)) && defined(__SUNPRO_CC) + b.iov_base = static_cast(const_cast(data)); + b.iov_len = size; #else // defined(BOOST_WINDOWS) || defined(__CYGWIN__) b.iov_base = const_cast(data); b.iov_len = size;