From: Mark Andrews Date: Mon, 2 Sep 2024 05:53:11 +0000 (+1000) Subject: Fix named-checkconf and statistics-channels X-Git-Tag: v9.21.2~45^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9246418e897a1db1f6e2a526178168787b588e1;p=thirdparty%2Fbind9.git Fix named-checkconf and statistics-channels If neither libxml2 nor libjson_c are available have named-checkconf fail if a statistics-channels block is specified. --- diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index 09275a830a6..9adaec5eef0 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -1259,8 +1259,13 @@ static cfg_clausedef_t namedconf_clauses[] = { { "options", &cfg_type_options, 0 }, { "parental-agents", &cfg_type_remoteservers, CFG_CLAUSEFLAG_MULTI }, { "primaries", &cfg_type_remoteservers, CFG_CLAUSEFLAG_MULTI }, +#if defined(HAVE_LIBXML2) || defined(HAVE_JSON_C) { "statistics-channels", &cfg_type_statschannels, CFG_CLAUSEFLAG_MULTI }, +#else + { "statistics-channels", &cfg_type_statschannels, + CFG_CLAUSEFLAG_MULTI | CFG_CLAUSEFLAG_NOTCONFIGURED }, +#endif { "tls", &cfg_type_tlsconf, CFG_CLAUSEFLAG_MULTI }, { "view", &cfg_type_view, CFG_CLAUSEFLAG_MULTI }, { NULL, NULL, 0 }