From 42868c6f3eaaa8844833487776c56e9762500237 Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Tue, 31 Aug 2021 14:06:51 +0300 Subject: [PATCH] Fix building BIND without DoH support The body of the listenelt_http() function was not properly wrapped in ifdef ... endif, leading to build failures with DoH disabled. --- bin/named/server.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/named/server.c b/bin/named/server.c index 7ba331f8264..ff046896850 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -411,10 +411,12 @@ fatal(named_server_t *server, const char *msg, isc_result_t result); static void named_server_reload(isc_task_t *task, isc_event_t *event); +#ifdef HAVE_LIBNGHTTP2 static isc_result_t listenelt_http(const cfg_obj_t *http, bool tls, const char *key, const char *cert, in_port_t port, isc_mem_t *mctx, ns_listenelt_t **target); +#endif static isc_result_t listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config, @@ -11311,10 +11313,14 @@ listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config, dscp = (isc_dscp_t)cfg_obj_asuint32(dscpobj); } +#ifdef HAVE_LIBNGHTTP2 if (http) { CHECK(listenelt_http(http_server, do_tls, key, cert, port, mctx, &delt)); - } else { + } +#endif /* HAVE_LIBNGHTTP2 */ + + if (!http) { CHECK(ns_listenelt_create(mctx, port, dscp, NULL, do_tls, key, cert, &delt)); } @@ -11332,6 +11338,7 @@ cleanup: return (result); } +#ifdef HAVE_LIBNGHTTP2 static isc_result_t listenelt_http(const cfg_obj_t *http, bool tls, const char *key, const char *cert, in_port_t port, isc_mem_t *mctx, @@ -11431,6 +11438,7 @@ error: } return (result); } +#endif /* HAVE_LIBNGHTTP2 */ isc_result_t named_server_dumpstats(named_server_t *server) { -- 2.47.3