mirror of
https://github.com/zeromq/libzmq.git
synced 2025-02-08 15:05:36 +01:00
Fix build on solaris
This commit is contained in:
parent
cfe2a821f3
commit
56aa49ff3d
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user