diff --git a/AUTHORS b/AUTHORS index ab849c70..8481813f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -20,6 +20,7 @@ Ben Gray Bernd Prager Bernd Melchers Bob Beaty +Brandon Carpenter Brian Buchanan Brett Cameron Burak Arslan diff --git a/src/ipc_address.cpp b/src/ipc_address.cpp index 39f0042a..fb1acc86 100644 --- a/src/ipc_address.cpp +++ b/src/ipc_address.cpp @@ -54,6 +54,10 @@ int zmq::ipc_address_t::resolve (const char *path_) address.sun_family = AF_UNIX; strcpy (address.sun_path, path_); +#if defined ZMQ_HAVE_LINUX + if (*path_ == '@') + *address.sun_path = '\0'; +#endif return 0; } @@ -65,7 +69,15 @@ int zmq::ipc_address_t::to_string (std::string &addr_) } std::stringstream s; +#if !defined ZMQ_HAVE_LINUX s << "ipc://" << address.sun_path; +#else + s << "ipc://"; + if (*address.sun_path) + s << address.sun_path; + else + s << "@" << address.sun_path + 1; +#endif addr_ = s.str (); return 0; }