From: Otto Date: Wed, 25 Aug 2021 13:56:44 +0000 (+0200) Subject: openssl/ssl2.h #defines CERT, #undef it. While there move an include not needed in... X-Git-Tag: rec-4.6.0-alpha1~2^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d6fa3ebf596ce3ad1ada20901554c2882553502;p=thirdparty%2Fpdns.git openssl/ssl2.h #defines CERT, #undef it. While there move an include not needed in the .hh file to the .cc file and add an error message in dnsparser.hh --- diff --git a/pdns/dnsrecords.hh b/pdns/dnsrecords.hh index b31dbe2cc6..3a2f6d1fba 100644 --- a/pdns/dnsrecords.hh +++ b/pdns/dnsrecords.hh @@ -457,6 +457,10 @@ private: }; +#ifdef CERT +#error likely openssl/ssl2.h is included, defining CERT, avoid that or undef CERT before including dnsrecords.hh +#endif + class CERTRecordContent : public DNSRecordContent { public: diff --git a/pdns/recursordist/rec-tcpout.cc b/pdns/recursordist/rec-tcpout.cc index 5d05fb596e..97ccb16853 100644 --- a/pdns/recursordist/rec-tcpout.cc +++ b/pdns/recursordist/rec-tcpout.cc @@ -22,6 +22,12 @@ #include "rec-tcpout.hh" +// This line from /usr/include/openssl/ssl2.h: # define CERT char +// throws dnsrecords.hh off the rails. +#undef CERT + +#include "syncres.hh" + timeval TCPOutConnectionManager::maxIdleTime; size_t TCPOutConnectionManager::maxQueries; size_t TCPOutConnectionManager::maxIdlePerAuth; diff --git a/pdns/recursordist/rec-tcpout.hh b/pdns/recursordist/rec-tcpout.hh index fb2361f5bd..70620800f2 100644 --- a/pdns/recursordist/rec-tcpout.hh +++ b/pdns/recursordist/rec-tcpout.hh @@ -24,7 +24,6 @@ #include "iputils.hh" #include "tcpiohandler.hh" -#include "syncres.hh" class TCPOutConnectionManager {