From: Otto Date: Fri, 4 Jun 2021 14:02:35 +0000 (+0200) Subject: Switch OpenBSD to kqueue mplexer; untested X-Git-Tag: dnsdist-1.7.0-alpha1~152^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F10467%2Fhead;p=thirdparty%2Fpdns.git Switch OpenBSD to kqueue mplexer; untested --- diff --git a/m4/pdns_check_os.m4 b/m4/pdns_check_os.m4 index da4bc8fd11..93aa96a7f6 100644 --- a/m4/pdns_check_os.m4 +++ b/m4/pdns_check_os.m4 @@ -25,6 +25,10 @@ AC_DEFUN([PDNS_CHECK_OS],[ THREADFLAGS="-pthread" have_freebsd="yes" ;; + openbsd*) + THREADFLAGS="-pthread" + have_openbsd="yes" + ;; *) LDFLAGS="-pthread $LDFLAGS" CXXFLAGS="-pthread $CXXFLAGS" @@ -32,6 +36,7 @@ AC_DEFUN([PDNS_CHECK_OS],[ esac AM_CONDITIONAL([HAVE_FREEBSD], [test "x$have_freebsd" = "xyes"]) + AM_CONDITIONAL([HAVE_OPENBSD], [test "x$have_openbsd" = "xyes"]) AM_CONDITIONAL([HAVE_LINUX], [test "x$have_linux" = "xyes"]) AM_CONDITIONAL([HAVE_SOLARIS], [test "x$have_solaris" = "xyes"]) diff --git a/pdns/Makefile.am b/pdns/Makefile.am index 7fa3b20418..949b144c07 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -1432,6 +1432,11 @@ ixfrdist_SOURCES += kqueuemplexer.cc testrunner_SOURCES += kqueuemplexer.cc endif +if HAVE_OPENBSD +ixfrdist_SOURCES += kqueuemplexer.cc +testrunner_SOURCES += kqueuemplexer.cc +endif + if HAVE_LINUX ixfrdist_SOURCES += epollmplexer.cc testrunner_SOURCES += epollmplexer.cc diff --git a/pdns/dnsdistdist/Makefile.am b/pdns/dnsdistdist/Makefile.am index 7d2ae2a2ee..f635d4e6b6 100644 --- a/pdns/dnsdistdist/Makefile.am +++ b/pdns/dnsdistdist/Makefile.am @@ -374,6 +374,11 @@ dnsdist_SOURCES += kqueuemplexer.cc testrunner_SOURCES += kqueuemplexer.cc endif +if HAVE_OPENBSD +dnsdist_SOURCES += kqueuemplexer.cc +testrunner_SOURCES += kqueuemplexer.cc +endif + if HAVE_LINUX dnsdist_SOURCES += epollmplexer.cc testrunner_SOURCES += epollmplexer.cc diff --git a/pdns/kqueuemplexer.cc b/pdns/kqueuemplexer.cc index 30094eccb6..cb8a3efb4e 100644 --- a/pdns/kqueuemplexer.cc +++ b/pdns/kqueuemplexer.cc @@ -28,7 +28,7 @@ #include #include "misc.hh" #include -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) #include #endif #include diff --git a/pdns/recursordist/Makefile.am b/pdns/recursordist/Makefile.am index ecdc4632f4..f318d55457 100644 --- a/pdns/recursordist/Makefile.am +++ b/pdns/recursordist/Makefile.am @@ -388,6 +388,11 @@ pdns_recursor_SOURCES += kqueuemplexer.cc testrunner_SOURCES += kqueuemplexer.cc endif +if HAVE_OPENBSD +pdns_recursor_SOURCES += kqueuemplexer.cc +testrunner_SOURCES += kqueuemplexer.cc +endif + if HAVE_LINUX pdns_recursor_SOURCES += epollmplexer.cc testrunner_SOURCES += epollmplexer.cc