aboutsummaryrefslogtreecommitdiffstats
path: root/community/pdns/pdns-boost-containers-exceptions.patch
blob: e510f4e1fb56c832773c7bf8f133e457b0bc7240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
commit db66571e89abf601a711b4a4f3fac19f0ecce342
Author: Peter van Dijk <peter.van.dijk@powerdns.com>
Date:   Fri Apr 23 14:12:34 2021 +0200

    boost 1.76 containers: use standard exceptions
    
    https://www.boost.org/users/history/version_1_76_0.html
    
    > Replaced default standard exception classes with Boost.Container own classes, reducing considerably the included files overhead. Example: in MSVC 19 boost/container/vector.hpp preprocessed file size reduces from 1,5MB to 930KB. If you still want to use standard exception classes, you can define BOOST_CONTAINER_USE_STD_EXCEPTIONS before using any Boost.Container class.

diff --git a/pdns/dnsname.hh b/pdns/dnsname.hh
index 7f7ee0ad3..c27b6dde7 100644
--- a/pdns/dnsname.hh
+++ b/pdns/dnsname.hh
@@ -35,6 +35,7 @@
 
 // it crashes on OSX and doesn't compile on OpenBSD
 #if BOOST_VERSION >= 105300 && ! defined( __APPLE__ ) && ! defined(__OpenBSD__)
+#define BOOST_CONTAINER_USE_STD_EXCEPTIONS
 #include <boost/container/string.hpp>
 #endif
 
diff --git a/pdns/dnswriter.cc b/pdns/dnswriter.cc
index adad9e021..36115dc6d 100644
--- a/pdns/dnswriter.cc
+++ b/pdns/dnswriter.cc
@@ -24,6 +24,7 @@
 #endif
 #include <boost/version.hpp>
 #if BOOST_VERSION >= 105400
+#define BOOST_CONTAINER_USE_STD_EXCEPTIONS
 #include <boost/container/static_vector.hpp>
 #endif
 #include "dnswriter.hh"
diff --git a/pdns/speedtest.cc b/pdns/speedtest.cc
index 27205d5ff..6a67bef01 100644
--- a/pdns/speedtest.cc
+++ b/pdns/speedtest.cc
@@ -1,5 +1,6 @@
 #include "config.h"
 #include <boost/format.hpp>
+#define BOOST_CONTAINER_USE_STD_EXCEPTIONS
 #include <boost/container/string.hpp>
 #include "dnsparser.hh"
 #include "sstuff.hh"