diff --git a/bin/tests/system/dyndb/driver/driver.c b/bin/tests/system/dyndb/driver/driver.c index f4497c9d65..7e8a249d3a 100644 --- a/bin/tests/system/dyndb/driver/driver.c +++ b/bin/tests/system/dyndb/driver/driver.c @@ -95,17 +95,6 @@ dyndb_init(isc_mem_t *mctx, const char *name, const char *parameters, REQUIRE(name != NULL); REQUIRE(dctx != NULL); - /* - * Depending on how dlopen() was called, we may not have - * access to named's global namespace, in which case we need - * to initialize libisc/libdns - */ - if (dctx->refvar != &isc_bind9) { - isc_log_setcontext(dctx->lctx); - dns_log_setcontext(dctx->lctx); - isc_hash_set_initializer(dctx->hashinit); - } - s = isc_mem_strdup(mctx, parameters); result = isc_commandline_strtoargv(mctx, s, &argc, &argv, 0); diff --git a/lib/dns/dyndb.c b/lib/dns/dyndb.c index 682e0b2eb3..6e3c7c3b76 100644 --- a/lib/dns/dyndb.c +++ b/lib/dns/dyndb.c @@ -274,8 +274,12 @@ dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, isc_log_t *lctx, REQUIRE(dctxp != NULL && *dctxp == NULL); dctx = isc_mem_get(mctx, sizeof(*dctx)); + *dctx = (dns_dyndbctx_t){ + .timermgr = tmgr, + .hashinit = hashinit, + .lctx = lctx, + }; - memset(dctx, 0, sizeof(*dctx)); if (view != NULL) { dns_view_attach(view, &dctx->view); } @@ -285,10 +289,6 @@ dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, isc_log_t *lctx, if (task != NULL) { isc_task_attach(task, &dctx->task); } - dctx->timermgr = tmgr; - dctx->hashinit = hashinit; - dctx->lctx = lctx; - dctx->refvar = &isc_bind9; isc_mem_attach(mctx, &dctx->mctx); dctx->magic = DNS_DYNDBCTX_MAGIC; diff --git a/lib/dns/include/dns/dyndb.h b/lib/dns/include/dns/dyndb.h index a219cb9158..3cb32c2180 100644 --- a/lib/dns/include/dns/dyndb.h +++ b/lib/dns/include/dns/dyndb.h @@ -41,7 +41,7 @@ struct dns_dyndbctx { dns_zonemgr_t *zmgr; isc_task_t *task; isc_timermgr_t *timermgr; - const bool *refvar; + const bool *refvar; /* unused, but retained for API compatibility */ }; #define DNS_DYNDBCTX_MAGIC ISC_MAGIC('D', 'd', 'b', 'c') diff --git a/lib/isc/Makefile.am b/lib/isc/Makefile.am index 74a43098f6..fc0ac5ff1e 100644 --- a/lib/isc/Makefile.am +++ b/lib/isc/Makefile.am @@ -15,7 +15,6 @@ libisc_la_HEADERS = \ include/isc/barrier.h \ include/isc/base32.h \ include/isc/base64.h \ - include/isc/bind9.h \ include/isc/buffer.h \ include/isc/cmocka.h \ include/isc/commandline.h \ @@ -120,7 +119,6 @@ libisc_la_SOURCES = \ backtrace.c \ base32.c \ base64.c \ - bind9.c \ buffer.c \ commandline.c \ condition.c \ diff --git a/lib/isc/bind9.c b/lib/isc/bind9.c deleted file mode 100644 index b04e56e352..0000000000 --- a/lib/isc/bind9.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * SPDX-License-Identifier: MPL-2.0 - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include - -#include - -bool isc_bind9 = true; diff --git a/lib/isc/include/isc/bind9.h b/lib/isc/include/isc/bind9.h deleted file mode 100644 index 38c568e759..0000000000 --- a/lib/isc/include/isc/bind9.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * SPDX-License-Identifier: MPL-2.0 - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#pragma once - -#include - -extern bool isc_bind9; diff --git a/lib/isc/include/isc/types.h b/lib/isc/include/isc/types.h index 185ff1c40a..346642a0c1 100644 --- a/lib/isc/include/isc/types.h +++ b/lib/isc/include/isc/types.h @@ -13,7 +13,6 @@ #pragma once -#include #include /*! \file isc/types.h diff --git a/lib/isc/lib.c b/lib/isc/lib.c index 7f6b12c4aa..343fedf108 100644 --- a/lib/isc/lib.c +++ b/lib/isc/lib.c @@ -13,7 +13,6 @@ /*! \file */ -#include #include #include #include diff --git a/lib/isc/mem.c b/lib/isc/mem.c index df75f6eab6..d9018f6dbe 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #include