From cbaf10978a8ffa98d98161aeec8d020c517b127b Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Fri, 19 Mar 2010 09:14:26 +0100 Subject: fixes for building with Sun CC --- src/dispatcher.cpp | 3 ++- src/tcp_listener.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dispatcher.cpp b/src/dispatcher.cpp index a49b598..93c5db3 100644 --- a/src/dispatcher.cpp +++ b/src/dispatcher.cpp @@ -264,7 +264,8 @@ int zmq::dispatcher_t::register_endpoint (const char *addr_, { 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) { errno = EADDRINUSE; endpoints_sync.unlock (); diff --git a/src/tcp_listener.cpp b/src/tcp_listener.cpp index fdcdf17..437c6eb 100644 --- a/src/tcp_listener.cpp +++ b/src/tcp_listener.cpp @@ -251,9 +251,9 @@ int zmq::tcp_listener_t::close () // If there's an underlying UNIX domain socket, get rid of the file it // is associated with. - struct sockaddr_un *sun = (struct sockaddr_un*) &addr; - if (AF_UNIX == sun->sun_family) { - rc = ::unlink(sun->sun_path); + struct sockaddr_un *su = (struct sockaddr_un*) &addr; + if (AF_UNIX == su->sun_family) { + rc = ::unlink(su->sun_path); if (rc != 0) return -1; } -- cgit v1.2.3