From c1c03b9a67c9fc55f2372ddeda3d1b0cc6c76460 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Thu, 10 May 2018 13:42:44 +0200 Subject: [PATCH] reorder includes to avoid Boost L conflict (cherry picked from commit dad05827243a837acbe29d68b6f5a68f47f5889f) --- pdns/epollmplexer.cc | 3 +-- pdns/lua-recursor4.cc | 5 ++--- pdns/lwres.cc | 2 +- pdns/pdns_recursor.cc | 2 +- pdns/protobuf.cc | 2 +- pdns/protobuf.hh | 6 +++--- pdns/rec-carbon.cc | 2 +- pdns/rec-lua-conf.cc | 2 +- pdns/rec_channel_rec.cc | 1 + pdns/recpacketcache.hh | 12 ++++++------ pdns/recursor_cache.cc | 2 +- pdns/rpzloader.cc | 2 +- pdns/syncres.cc | 2 +- pdns/syncres.hh | 13 +++++++------ pdns/test-recpacketcache_cc.cc | 2 +- pdns/validate-recursor.cc | 2 +- pdns/ws-recursor.cc | 2 +- 17 files changed, 31 insertions(+), 31 deletions(-) diff --git a/pdns/epollmplexer.cc b/pdns/epollmplexer.cc index 6aca8cba6..de833fe06 100644 --- a/pdns/epollmplexer.cc +++ b/pdns/epollmplexer.cc @@ -23,16 +23,15 @@ #include "config.h" #endif #include "mplexer.hh" +#include "syncres.hh" #include "sstuff.hh" #include #include #include "misc.hh" -#include "syncres.hh" #ifdef __linux__ #include #endif -#include "namespaces.hh" #include "namespaces.hh" class EpollFDMultiplexer : public FDMultiplexer diff --git a/pdns/lua-recursor4.cc b/pdns/lua-recursor4.cc index c73951a58..b18c36e9b 100644 --- a/pdns/lua-recursor4.cc +++ b/pdns/lua-recursor4.cc @@ -19,17 +19,16 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "lua-recursor4.hh" #include -#include "logger.hh" -#include "dnsparser.hh" #include "syncres.hh" +#include "logger.hh" #include "namespaces.hh" #include "rec_channel.hh" #include "ednsoptions.hh" #include "ednssubnet.hh" #include "filterpo.hh" #include +#include "lua-recursor4.hh" #if !defined(HAVE_LUA) RecursorLua4::RecursorLua4(const std::string &fname) diff --git a/pdns/lwres.cc b/pdns/lwres.cc index 516f92d99..11b3876cd 100644 --- a/pdns/lwres.cc +++ b/pdns/lwres.cc @@ -22,6 +22,7 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include "syncres.hh" #include "utility.hh" #include "lwres.hh" #include @@ -38,7 +39,6 @@ #include "pdnsexception.hh" #include "arguments.hh" #include "sstuff.hh" -#include "syncres.hh" #include "dnswriter.hh" #include "dnsparser.hh" #include "logger.hh" diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index dbc1a9b53..8d33a8b65 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -28,9 +28,9 @@ #include #include +#include "recpacketcache.hh" #include "ws-recursor.hh" #include -#include "recpacketcache.hh" #include "utility.hh" #include "dns_random.hh" #ifdef HAVE_LIBSODIUM diff --git a/pdns/protobuf.cc b/pdns/protobuf.cc index 523b526cc..0a3b70f9e 100644 --- a/pdns/protobuf.cc +++ b/pdns/protobuf.cc @@ -1,7 +1,7 @@ +#include "protobuf.hh" #include "gettime.hh" #include "dnsparser.hh" -#include "protobuf.hh" #include "dnsparser.hh" #include "gettime.hh" diff --git a/pdns/protobuf.hh b/pdns/protobuf.hh index b9aeaf5c9..c33155016 100644 --- a/pdns/protobuf.hh +++ b/pdns/protobuf.hh @@ -26,15 +26,15 @@ #include "config.h" -#include "dnsname.hh" -#include "iputils.hh" - #ifdef HAVE_PROTOBUF #include #include #include "dnsmessage.pb.h" #endif /* HAVE_PROTOBUF */ +#include "dnsname.hh" +#include "iputils.hh" + class DNSProtoBufMessage { public: diff --git a/pdns/rec-carbon.cc b/pdns/rec-carbon.cc index 7da9a788e..6c1cdff7c 100644 --- a/pdns/rec-carbon.cc +++ b/pdns/rec-carbon.cc @@ -1,8 +1,8 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include "mtasker.hh" #include "syncres.hh" +#include "mtasker.hh" #include "rec_channel.hh" #include "iputils.hh" #include "logger.hh" diff --git a/pdns/rec-lua-conf.cc b/pdns/rec-lua-conf.cc index 4e8468648..dd53f1073 100644 --- a/pdns/rec-lua-conf.cc +++ b/pdns/rec-lua-conf.cc @@ -6,11 +6,11 @@ #include #include #include "namespaces.hh" +#include "syncres.hh" #include "logger.hh" #include "rec-lua-conf.hh" #include "sortlist.hh" #include "filterpo.hh" -#include "syncres.hh" #include "rpzloader.hh" #include "base64.hh" #include "remote_logger.hh" diff --git a/pdns/rec_channel_rec.cc b/pdns/rec_channel_rec.cc index b6315263b..f9b041748 100644 --- a/pdns/rec_channel_rec.cc +++ b/pdns/rec_channel_rec.cc @@ -1,6 +1,7 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include "syncres.hh" #include "utility.hh" #include "rec_channel.hh" #include diff --git a/pdns/recpacketcache.hh b/pdns/recpacketcache.hh index 65a6baad9..07af0c5d5 100644 --- a/pdns/recpacketcache.hh +++ b/pdns/recpacketcache.hh @@ -21,6 +21,12 @@ */ #ifndef PDNS_RECPACKETCACHE_HH #define PDNS_RECPACKETCACHE_HH + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "rec-protobuf.hh" + #include #include #include @@ -33,12 +39,6 @@ #include #include -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "rec-protobuf.hh" - - using namespace ::boost::multi_index; //! Stores whole packets, ready for lobbing back at the client. Not threadsafe. diff --git a/pdns/recursor_cache.cc b/pdns/recursor_cache.cc index e987b74c0..a9edff475 100644 --- a/pdns/recursor_cache.cc +++ b/pdns/recursor_cache.cc @@ -4,12 +4,12 @@ #include +#include "syncres.hh" #include "recursor_cache.hh" #include "misc.hh" #include #include "dnsrecords.hh" #include "arguments.hh" -#include "syncres.hh" #include "recursor_cache.hh" #include "cachecleaner.hh" #include "namespaces.hh" diff --git a/pdns/rpzloader.cc b/pdns/rpzloader.cc index bfee4685e..1a1df65ab 100644 --- a/pdns/rpzloader.cc +++ b/pdns/rpzloader.cc @@ -1,8 +1,8 @@ +#include "syncres.hh" #include "rpzloader.hh" #include "zoneparser-tng.hh" #include "dnsparser.hh" #include "dnsrecords.hh" -#include "syncres.hh" #include "resolver.hh" #include "logger.hh" #include "rec-lua-conf.hh" diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 3f1cb68d1..55ce1a711 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -25,9 +25,9 @@ #endif #include +#include "syncres.hh" #include "lua-recursor4.hh" #include "utility.hh" -#include "syncres.hh" #include #include #include "dnsrecords.hh" diff --git a/pdns/syncres.hh b/pdns/syncres.hh index 838694c61..3ceec3472 100644 --- a/pdns/syncres.hh +++ b/pdns/syncres.hh @@ -21,6 +21,13 @@ */ #ifndef PDNS_SYNCRES_HH #define PDNS_SYNCRES_HH + +#include "config.h" +#ifdef HAVE_PROTOBUF +#include +#include +#endif + #include #include #include "utility.hh" @@ -50,12 +57,6 @@ #include "ednssubnet.hh" #include "filterpo.hh" -#include "config.h" -#ifdef HAVE_PROTOBUF -#include -#include -#endif - void primeHints(void); int getRootNS(void); class RecursorLua4; diff --git a/pdns/test-recpacketcache_cc.cc b/pdns/test-recpacketcache_cc.cc index 8d723253b..f6cd9bb2c 100644 --- a/pdns/test-recpacketcache_cc.cc +++ b/pdns/test-recpacketcache_cc.cc @@ -5,11 +5,11 @@ #include "config.h" #endif #include +#include "recpacketcache.hh" #include "dnswriter.hh" #include "dnsrecords.hh" #include "dns_random.hh" #include "iputils.hh" -#include "recpacketcache.hh" #include diff --git a/pdns/validate-recursor.cc b/pdns/validate-recursor.cc index 1aca8cfc0..5d749935d 100644 --- a/pdns/validate-recursor.cc +++ b/pdns/validate-recursor.cc @@ -1,6 +1,6 @@ +#include "syncres.hh" #include "validate.hh" #include "validate-recursor.hh" -#include "syncres.hh" #include "logger.hh" DNSSECMode g_dnssecmode{DNSSECMode::ProcessNoValidate}; diff --git a/pdns/ws-recursor.cc b/pdns/ws-recursor.cc index 84e06c0aa..c3211ed50 100644 --- a/pdns/ws-recursor.cc +++ b/pdns/ws-recursor.cc @@ -22,6 +22,7 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include "syncres.hh" #include "ws-recursor.hh" #include "json.hh" @@ -32,7 +33,6 @@ #include "rec_channel.hh" #include "arguments.hh" #include "misc.hh" -#include "syncres.hh" #include "dnsparser.hh" #include "json11.hpp" #include "webserver.hh" -- 2.40.0