From a30361f9f07cb3c4f9ad32dc83555bc593aa3311 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Wed, 31 Aug 2016 16:22:57 +0200 Subject: [PATCH] Rec: support boost's fcontext in boost 1.61+ --- pdns/mtasker_fcontext.cc | 4 ++++ pdns/recursordist/configure.ac | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/pdns/mtasker_fcontext.cc b/pdns/mtasker_fcontext.cc index 1b2a11be26..bc37e769f1 100644 --- a/pdns/mtasker_fcontext.cc +++ b/pdns/mtasker_fcontext.cc @@ -23,7 +23,11 @@ #include #include #include +#if BOOST_VERSION > 106100 +#include +#else #include +#endif #include using boost::context::make_fcontext; diff --git a/pdns/recursordist/configure.ac b/pdns/recursordist/configure.ac index 19ad1133c8..1d1500f0f3 100644 --- a/pdns/recursordist/configure.ac +++ b/pdns/recursordist/configure.ac @@ -54,9 +54,15 @@ AC_DEFUN([PDNS_SELECT_CONTEXT_IMPL], [ LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS" fi AC_MSG_NOTICE([checking whether the Boost context library actually links...]) - BOOST_FIND_HEADER([boost/context/fcontext.hpp], [ : ], [ - BOOST_FIND_LIB([context], [$1], [boost/context/fcontext.hpp], [[]]) - ]) + if test $boost_major_version -ge 161; then + BOOST_FIND_HEADER([boost/context/detail/fcontext.hpp], [ : ], [ + BOOST_FIND_LIB([context], [$1], [boost/context/detail/fcontext.hpp], [[]]) + ]) + else + BOOST_FIND_HEADER([boost/context/fcontext.hpp], [ : ], [ + BOOST_FIND_LIB([context], [$1], [boost/context/fcontext.hpp], [[]]) + ]) + fi case $boost_cv_lib_context in (yes) AC_MSG_NOTICE([MTasker will use the Boost context library for context switching]) -- 2.47.2