Problem: Solaris Studio does not convert from char * to string

Solution: do it explicitly to fix build on Solaris 10/11 with the Sun
compiler
This commit is contained in:
Luca Boccassi
2018-05-13 13:16:37 +01:00
parent 3d9c119543
commit 8b82ed50a2
4 changed files with 10 additions and 7 deletions

View File

@@ -999,14 +999,15 @@ bool zmq::stream_engine_t::init_properties (properties_t &properties)
{
if (peer_address.empty ())
return false;
properties.ZMQ_MAP_INSERT_OR_EMPLACE (ZMQ_MSG_PROPERTY_PEER_ADDRESS,
peer_address);
properties.ZMQ_MAP_INSERT_OR_EMPLACE (
std::string (ZMQ_MSG_PROPERTY_PEER_ADDRESS), peer_address);
// Private property to support deprecated SRCFD
std::ostringstream stream;
stream << (int) s;
std::string fd_string = stream.str ();
properties.ZMQ_MAP_INSERT_OR_EMPLACE ("__fd", ZMQ_MOVE (fd_string));
properties.ZMQ_MAP_INSERT_OR_EMPLACE (std::string ("__fd"),
ZMQ_MOVE (fd_string));
return true;
}