Commit dd35385d authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #259 from mkoppanen/solaris-build

Fix build on solaris
parents cfe2a821 56aa49ff
...@@ -97,18 +97,18 @@ void zmq::ipc_listener_t::in_event () ...@@ -97,18 +97,18 @@ void zmq::ipc_listener_t::in_event ()
int zmq::ipc_listener_t::get_address (std::string *addr_) int zmq::ipc_listener_t::get_address (std::string *addr_)
{ {
struct sockaddr_un sun; struct sockaddr_un saddr;
int rc; int rc;
// Get the details of the IPC socket // Get the details of the IPC socket
socklen_t sl = sizeof(sockaddr_un); socklen_t sl = sizeof(sockaddr_un);
rc = getsockname (s, (sockaddr *)&sun, &sl); rc = getsockname (s, (sockaddr *)&saddr, &sl);
if (rc != 0) { if (rc != 0) {
return rc; return rc;
} }
// Store the address for retrieval by users using wildcards // Store the address for retrieval by users using wildcards
*addr_ = std::string("ipc://") + std::string(sun.sun_path); *addr_ = std::string("ipc://") + std::string(saddr.sun_path);
return 0; return 0;
} }
......
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