]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Provide GeoIP2 library version in version
authorPetr Menšík <pemensik@redhat.com>
Mon, 18 Nov 2019 20:51:36 +0000 (21:51 +0100)
committerMark Andrews <marka@isc.org>
Tue, 17 Dec 2019 23:46:52 +0000 (23:46 +0000)
Libmaxmind does not provide any version macro for link time version.
Print at least runtime version library used, if linked.

bin/named/main.c

index f1c14c511d172888ed2dd5eb531a6c28cb4b6969..e57ed1c60f888bf4417cbd967f3539dc9ec0d399 100644 (file)
 #include <json_c_version.h>
 #endif /* HAVE_JSON_C */
 
+#ifdef HAVE_GEOIP2
+#include <maxminddb.h>
+#endif
+
 /*
  * Defining NAMED_MAIN provides storage declarations (rather than extern)
  * for variables in named/globals.h.
@@ -548,6 +552,11 @@ OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0 or higher */
               ZLIB_VERSION);
        printf("linked to zlib version: %s\n",
               zlibVersion());
+#endif
+#if defined(HAVE_GEOIP2)
+       /* Unfortunately, no version define on link time */
+       printf("linked to maxminddb version: %s\n",
+              MMDB_lib_version());
 #endif
        printf("threads support is enabled\n\n");