summaryrefslogtreecommitdiff
path: root/src/ip.cpp
diff options
context:
space:
mode:
authorMartin Lucina <mato@kotelna.sk>2010-02-18 19:38:15 +0100
committerMartin Lucina <mato@kotelna.sk>2010-02-18 19:38:15 +0100
commit2a79a943de417679c562cd4a917e1d1bc19b0d25 (patch)
tree43ce287a60b07a4c4c9ba879606594e2bf6b7b9a /src/ip.cpp
parent776b12633981fd95050e138daeeba00a65d9532b (diff)
Add NetBSD support
Diffstat (limited to 'src/ip.cpp')
-rw-r--r--src/ip.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/ip.cpp b/src/ip.cpp
index 822e359..b3ad610 100644
--- a/src/ip.cpp
+++ b/src/ip.cpp
@@ -125,7 +125,8 @@ static int resolve_nic_name (in_addr* addr_, char const *interface_)
#elif ((defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\
defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_OPENBSD ||\
- defined ZMQ_HAVE_QNXNTO) && defined ZMQ_HAVE_IFADDRS)
+ defined ZMQ_HAVE_QNXNTO || defined ZMQ_HAVE_NETBSD)\
+ && defined ZMQ_HAVE_IFADDRS)
#include <ifaddrs.h>
@@ -239,11 +240,7 @@ int zmq::resolve_ip_interface (sockaddr_storage* addr_, socklen_t *addr_len_,
// Restrict hostname/service to literals to avoid any DNS lookups or
// service-name irregularity due to indeterminate socktype.
-#if defined ZMQ_HAVE_OSX
- req.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
-#else
req.ai_flags = AI_PASSIVE | AI_NUMERICHOST | AI_NUMERICSERV;
-#endif
// Resolve the literal address. Some of the error info is lost in case
// of error, however, there's no way to report EAI errors via errno.
@@ -292,11 +289,7 @@ int zmq::resolve_ip_hostname (sockaddr_storage *addr_, socklen_t *addr_len_,
// Avoid named services due to unclear socktype, and don't pick IPv6
// addresses if we don't have a local IPv6 address configured.
-#if defined ZMQ_HAVE_OSX
- req.ai_flags = AI_ADDRCONFIG;
-#else
req.ai_flags = AI_NUMERICSERV | AI_ADDRCONFIG;
-#endif
// 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.