From e15da4b38c7ed3c61138162ac514f392d81a8c67 Mon Sep 17 00:00:00 2001 From: Doron Somech Date: Wed, 4 May 2016 16:09:31 +0300 Subject: [PATCH] problem: compilation error on osx --- src/stream_engine.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index afc95ba8..5c074084 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -987,8 +987,10 @@ bool zmq::stream_engine_t::init_properties (properties_t & properties) { properties.insert (std::make_pair("Peer-Address", peer_address)); // Private property to support deprecated SRCFD - std::string fd_string = static_cast(&(std::ostringstream() << (int)s))->str(); - properties.insert (std::make_pair("__fd", fd_string)); + std::ostringstream stream; + stream << (int)s; + std::string fd_string = stream.str(); + properties.insert(std::make_pair("__fd", fd_string)); return true; }