From 6023162ac57056ad65aa3cd8a0b5aee52c61503f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 2 Sep 2024 15:53:11 +1000 Subject: [PATCH] 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. (cherry picked from commit b9246418e897a1db1f6e2a526178168787b588e1) --- lib/isccfg/namedconf.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index c1aa72c1e1..7d7a0e0717 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -1164,8 +1164,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 }