mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-09 23:36:04 +00:00
fixes for building with Sun CC
This commit is contained in:
parent
ae35a1644c
commit
cbaf10978a
@ -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 ();
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user