From cea78b537ac79125f0bc33caeb87d10d8611449f Mon Sep 17 00:00:00 2001 From: Andrew Nelless Date: Fri, 26 Feb 2016 14:50:37 +0000 Subject: [PATCH] Add fallback to ucontext for Boost <= 1.51 --- pdns/mtasker_context.cc | 10 ++++++++++ pdns/recursordist/Makefile.am | 2 +- pdns/recursordist/mtasker_context.cc | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 pdns/mtasker_context.cc create mode 120000 pdns/recursordist/mtasker_context.cc diff --git a/pdns/mtasker_context.cc b/pdns/mtasker_context.cc new file mode 100644 index 0000000000..549d7c6b0e --- /dev/null +++ b/pdns/mtasker_context.cc @@ -0,0 +1,10 @@ +#include + +/* Boost Context was introduced in 1.51 (Aug 2012), but it's probably not worth + * supporting it because there was an immediate API break in 1.52 (Nov 2012) + */ +#if BOOST_VERSION <= 105100 +#include "mtasker_ucontext.cc" +#else +#include "mtasker_fcontext.cc" +#endif diff --git a/pdns/recursordist/Makefile.am b/pdns/recursordist/Makefile.am index c73e1d6a6b..7e0c3a23ec 100644 --- a/pdns/recursordist/Makefile.am +++ b/pdns/recursordist/Makefile.am @@ -85,7 +85,7 @@ pdns_recursor_SOURCES = \ misc.hh misc.cc \ mplexer.hh \ mtasker.hh \ - mtasker_context.hh mtasker_fcontext.cc \ + mtasker_context.hh mtasker_context.cc \ namespaces.hh \ nsecrecords.cc \ opensslsigners.cc opensslsigners.hh \ diff --git a/pdns/recursordist/mtasker_context.cc b/pdns/recursordist/mtasker_context.cc new file mode 120000 index 0000000000..c31cfc42b0 --- /dev/null +++ b/pdns/recursordist/mtasker_context.cc @@ -0,0 +1 @@ +../mtasker_context.cc \ No newline at end of file -- 2.47.2