]> granicus.if.org Git - pdns/commitdiff
Add fallback to ucontext for Boost <= 1.51
authorAndrew Nelless <andrew@nelless.net>
Fri, 26 Feb 2016 14:50:37 +0000 (14:50 +0000)
committerAndrew Nelless <andrew@nelless.net>
Sun, 28 Feb 2016 11:10:14 +0000 (11:10 +0000)
pdns/mtasker_context.cc [new file with mode: 0644]
pdns/recursordist/Makefile.am
pdns/recursordist/mtasker_context.cc [new symlink]

diff --git a/pdns/mtasker_context.cc b/pdns/mtasker_context.cc
new file mode 100644 (file)
index 0000000..549d7c6
--- /dev/null
@@ -0,0 +1,10 @@
+#include <boost/version.hpp>
+
+/* 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
index c73e1d6a6bbc1b6031c438dcf43897dd3383ebf9..7e0c3a23ec95ad6176ce17c00eb29168ac67f278 100644 (file)
@@ -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 (symlink)
index 0000000..c31cfc4
--- /dev/null
@@ -0,0 +1 @@
+../mtasker_context.cc
\ No newline at end of file