Fix build on windows

This commit is contained in:
Mikko Koppanen 2012-02-17 22:06:10 +00:00
parent dd35385da3
commit 51b59b40dd
2 changed files with 6 additions and 2 deletions

View File

@ -41,10 +41,12 @@ zmq::address_t::~address_t ()
resolved.tcp_addr = 0;
}
}
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
else if (protocol == "ipc") {
if (resolved.ipc_addr) {
delete resolved.ipc_addr;
resolved.ipc_addr = 0;
}
}
#endif
}

View File

@ -26,8 +26,9 @@
namespace zmq
{
class tcp_address_t;
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
class ipc_address_t;
#endif
struct address_t {
address_t (const std::string &protocol_, const std::string &address_);
@ -39,10 +40,11 @@ namespace zmq
// Protocol specific resolved address
union {
tcp_address_t *tcp_addr;
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
ipc_address_t *ipc_addr;
#endif
} resolved;
};
}
#endif