Skip to content

Commit

Permalink
Fix getaddrinfo calls to work on OpenVMS
Browse files Browse the repository at this point in the history
Signed-off by: Brett Cameron <[email protected]>
  • Loading branch information
Brett Cameron authored and sustrik committed Nov 4, 2011
1 parent 50a9ee6 commit de1d32d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tcp_address.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,11 @@ int zmq::tcp_address_t::resolve_interface (char const *interface_,
int zmq::tcp_address_t::resolve_hostname (const char *hostname_, bool ipv4only_)
{
// Set up the query.
#if defined ZMQ_HAVE_OPENVMS && defined __ia64 && __INITIAL_POINTER_SIZE == 64
__addrinfo64 req;
#else
addrinfo req;
#endif
memset (&req, 0, sizeof (req));

// Choose IPv4 or IPv6 protocol family. Note that IPv6 allows for
Expand All @@ -329,7 +333,11 @@ int zmq::tcp_address_t::resolve_hostname (const char *hostname_, bool ipv4only_)

// Resolve host name. Some of the error info is lost in case of error,
// however, there's no way to report EAI errors via errno.
#if defined ZMQ_HAVE_OPENVMS && defined __ia64 && __INITIAL_POINTER_SIZE == 64
__addrinfo64 *res;
#else
addrinfo *res;
#endif
int rc = getaddrinfo (hostname_, NULL, &req, &res);
if (rc) {
switch (rc) {
Expand Down

0 comments on commit de1d32d

Please sign in to comment.