Commit cbaf1097 authored by Martin Sustrik's avatar Martin Sustrik

fixes for building with Sun CC

parent ae35a164
...@@ -264,7 +264,8 @@ int zmq::dispatcher_t::register_endpoint (const char *addr_, ...@@ -264,7 +264,8 @@ int zmq::dispatcher_t::register_endpoint (const char *addr_,
{ {
endpoints_sync.lock (); endpoints_sync.lock ();
bool inserted = endpoints.insert (std::make_pair (addr_, socket_)).second; bool inserted = endpoints.insert (std::make_pair (std::string (addr_),
socket_)).second;
if (!inserted) { if (!inserted) {
errno = EADDRINUSE; errno = EADDRINUSE;
endpoints_sync.unlock (); endpoints_sync.unlock ();
......
...@@ -251,9 +251,9 @@ int zmq::tcp_listener_t::close () ...@@ -251,9 +251,9 @@ int zmq::tcp_listener_t::close ()
// If there's an underlying UNIX domain socket, get rid of the file it // If there's an underlying UNIX domain socket, get rid of the file it
// is associated with. // is associated with.
struct sockaddr_un *sun = (struct sockaddr_un*) &addr; struct sockaddr_un *su = (struct sockaddr_un*) &addr;
if (AF_UNIX == sun->sun_family) { if (AF_UNIX == su->sun_family) {
rc = ::unlink(sun->sun_path); rc = ::unlink(su->sun_path);
if (rc != 0) if (rc != 0)
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment