From ee984b1fe615d42191b348438f8c66690db230b0 Mon Sep 17 00:00:00 2001 From: Markus Pfeiffer Date: Thu, 3 Sep 2015 08:58:12 +0100 Subject: [PATCH] Make DragonFly a first class citizen in terms of compilation --- configure.ac | 4 ++++ src/gssapi_mechanism_base.hpp | 2 +- src/tcp_address.cpp | 7 ++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index c7712e89..365286bf 100644 --- a/configure.ac +++ b/configure.ac @@ -193,6 +193,10 @@ case "${host_os}" in CPPFLAGS="-D__BSD_VISIBLE $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_FREEBSD, 1, [Have FreeBSD OS]) ;; + *dragonfly*) + CPPFLAGS="-D__BSD_VISIBLE $CPPFLAGS" + AC_DEFINE(ZMQ_HAVE_DRAGONFLY, 1, [Have DragonFly OS]) + ;; *darwin*) # Define on Darwin to enable all library features CPPFLAGS="-D_DARWIN_C_SOURCE $CPPFLAGS" diff --git a/src/gssapi_mechanism_base.hpp b/src/gssapi_mechanism_base.hpp index 1e26a950..fc14a832 100644 --- a/src/gssapi_mechanism_base.hpp +++ b/src/gssapi_mechanism_base.hpp @@ -34,7 +34,7 @@ #ifdef HAVE_LIBGSSAPI_KRB5 -#ifndef ZMQ_HAVE_FREEBSD +#if !defined(ZMQ_HAVE_FREEBSD) && !defined(ZMQ_HAVE_DRAGONFLY) #include #endif #include diff --git a/src/tcp_address.cpp b/src/tcp_address.cpp index e2b4e800..2c30bc91 100644 --- a/src/tcp_address.cpp +++ b/src/tcp_address.cpp @@ -157,7 +157,8 @@ int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_, bool is_ #elif ((defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_OPENBSD ||\ - defined ZMQ_HAVE_QNXNTO || defined ZMQ_HAVE_NETBSD)\ + defined ZMQ_HAVE_QNXNTO || defined ZMQ_HAVE_NETBSD ||\ + defined ZMQ_HAVE_DRAGONFLY)\ && defined ZMQ_HAVE_IFADDRS) #include @@ -280,7 +281,7 @@ int zmq::tcp_address_t::resolve_interface (const char *interface_, bool ipv6_, b // service-name irregularity due to indeterminate socktype. req.ai_flags = AI_PASSIVE | AI_NUMERICHOST; -#if defined AI_V4MAPPED && !defined ZMQ_HAVE_FREEBSD +#if defined AI_V4MAPPED && !defined ZMQ_HAVE_FREEBSD && !defined ZMQ_HAVE_DRAGONFLY // In this API we only require IPv4-mapped addresses when // no native IPv6 interfaces are available (~AI_ALL). // This saves an additional DNS roundtrip for IPv4 addresses. @@ -330,7 +331,7 @@ int zmq::tcp_address_t::resolve_hostname (const char *hostname_, bool ipv6_, boo // doesn't really matter, since it's not included in the addr-output. req.ai_socktype = SOCK_STREAM; -#if defined AI_V4MAPPED && !defined ZMQ_HAVE_FREEBSD +#if defined AI_V4MAPPED && !defined ZMQ_HAVE_FREEBSD && !defined ZMQ_HAVE_DRAGONFLY // In this API we only require IPv4-mapped addresses when // no native IPv6 interfaces are available. // This saves an additional DNS roundtrip for IPv4 addresses.