Solaris build fixed

This commit is contained in:
Martin Sustrik 2010-01-16 09:39:44 +01:00
parent a507d16e13
commit 51e012c446
4 changed files with 9 additions and 7 deletions

View File

@ -7,6 +7,7 @@ Conrad D. Steenberg
Dhruva Krishnamurthy
Dirk O. Kaar
Erich Heine
Erik Rigtorp
Frank Denis
George Neill
Jon Dyte

View File

@ -320,7 +320,7 @@ int zmq::resolve_local_path (sockaddr_un *addr_, const char *path_)
return -1;
}
strcpy (addr_->sun_path, path_);
addr_->sun_family = AF_LOCAL;
addr_->sun_family = AF_UNIX;
return 0;
}

View File

@ -211,8 +211,10 @@ int zmq::tcp_connecter_t::open ()
errno = err;
return -1;
}
else if (AF_LOCAL == sa->sa_family) {
s = socket (AF_LOCAL, SOCK_STREAM, 0);
else if (AF_UNIX == sa->sa_family) {
// Create the socket.
s = socket (AF_UNIX, SOCK_STREAM, 0);
if (s == -1)
return -1;

View File

@ -207,7 +207,7 @@ int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_)
return -1;
// Create a listening socket.
s = socket (AF_LOCAL, SOCK_STREAM, 0);
s = socket (AF_UNIX, SOCK_STREAM, 0);
if (s == -1)
return -1;
@ -250,9 +250,8 @@ 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 *sa = (struct sockaddr*) &addr;
if (AF_LOCAL == sa->sa_family) {
struct sockaddr_un *sun = (struct sockaddr_un*) &addr;
struct sockaddr_un *sun = (struct sockaddr_un*) &addr;
if (AF_UNIX == sun->sun_family) {
rc = ::unlink(sun->sun_path);
if (rc != 0)
return -1;