]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix building BIND without DoH support
authorArtem Boldariev <artem@boldariev.com>
Tue, 31 Aug 2021 11:06:51 +0000 (14:06 +0300)
committerMichał Kępień <michal@isc.org>
Tue, 31 Aug 2021 13:20:05 +0000 (15:20 +0200)
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

index 7ba331f826401a1ebc2bde1339da2cd3e2f0be15..ff046896850f789396a2064fc50aae9988a3ce07 100644 (file)
@@ -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) {