diff options
author | Martin Sustrik <sustrik@fastmq.commkdir> | 2010-01-16 09:39:44 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@fastmq.commkdir> | 2010-01-16 09:39:44 +0100 |
commit | 51e012c446b500fe3dfb46b6475ebf018ecfeaa0 (patch) | |
tree | fb8f4df5df37f9f0258ef10f21904a764652ca39 | |
parent | a507d16e13fdd6b13e1e69d0d305750995513a1f (diff) |
Solaris build fixed
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | src/ip.cpp | 2 | ||||
-rw-r--r-- | src/tcp_connecter.cpp | 6 | ||||
-rw-r--r-- | src/tcp_listener.cpp | 7 |
4 files changed, 9 insertions, 7 deletions
@@ -7,6 +7,7 @@ Conrad D. Steenberg Dhruva Krishnamurthy Dirk O. Kaar Erich Heine +Erik Rigtorp Frank Denis George Neill Jon Dyte @@ -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; } diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp index f148ae4..6b7819b 100644 --- a/src/tcp_connecter.cpp +++ b/src/tcp_connecter.cpp @@ -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; diff --git a/src/tcp_listener.cpp b/src/tcp_listener.cpp index 9a9850d..2323e31 100644 --- a/src/tcp_listener.cpp +++ b/src/tcp_listener.cpp @@ -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; |