]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
geoipbackend: Make GeoIP interface optional
authorAki Tuomi <cmouse@cmouse.fi>
Sat, 30 Dec 2017 19:23:49 +0000 (21:23 +0200)
committerAki Tuomi <cmouse@cmouse.fi>
Wed, 14 Feb 2018 07:15:53 +0000 (09:15 +0200)
modules/geoipbackend/geoipinterface-dat.cc

index a59266f9b22f6c01f086e0980f7d809d4ddff827..c5d2a0414ba5803c3af2aaefa6887313e1c00a9f 100644 (file)
@@ -24,6 +24,7 @@
 #endif
 #include "geoipbackend.hh"
 #include "geoipinterface.hh"
+#ifdef HAVE_GEOIP
 #include "GeoIPCity.h"
 
 struct geoip_deleter {
@@ -388,3 +389,11 @@ unique_ptr<GeoIPInterface> GeoIPInterface::makeDATInterface(const string &fname,
     mode = opt->second;
   return unique_ptr<GeoIPInterface>(new GeoIPInterfaceDAT(fname, mode));
 }
+
+#else
+
+unique_ptr<GeoIPInterface> GeoIPInterface::makeDATInterface(const string &fname, const map<string, string>& opts) {
+  throw PDNSException("libGeoIP support not compiled in");
+}
+
+#endif