Make DragonFly a first class citizen in terms of compilation

This commit is contained in:
Markus Pfeiffer 2015-09-03 08:58:12 +01:00
parent 32d7da1103
commit ee984b1fe6
3 changed files with 9 additions and 4 deletions

View File

@ -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"

View File

@ -34,7 +34,7 @@
#ifdef HAVE_LIBGSSAPI_KRB5
#ifndef ZMQ_HAVE_FREEBSD
#if !defined(ZMQ_HAVE_FREEBSD) && !defined(ZMQ_HAVE_DRAGONFLY)
#include <gssapi/gssapi_generic.h>
#endif
#include <gssapi/gssapi_krb5.h>

View File

@ -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 <ifaddrs.h>
@ -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.