mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-05 09:05:40 +00:00
[master] fix win32 build
3595. [port] win32: Fix build problems introduced by change #3550. [RT #33807]
This commit is contained in:
@@ -75,7 +75,9 @@ dns_lib_initmsgcat(void) {
|
||||
|
||||
static isc_once_t init_once = ISC_ONCE_INIT;
|
||||
static isc_mem_t *dns_g_mctx = NULL;
|
||||
#ifndef WIN32
|
||||
static dns_dbimplementation_t *dbimp = NULL;
|
||||
#endif
|
||||
static isc_boolean_t initialize_done = ISC_FALSE;
|
||||
static isc_mutex_t reflock;
|
||||
static unsigned int references = 0;
|
||||
@@ -90,9 +92,11 @@ initialize(void) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return;
|
||||
dns_result_register();
|
||||
#ifndef WIN32
|
||||
result = dns_ecdb_register(dns_g_mctx, &dbimp);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_mctx;
|
||||
#endif
|
||||
result = isc_hash_create(dns_g_mctx, NULL, DNS_NAME_MAXWIRE);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_db;
|
||||
@@ -113,9 +117,11 @@ initialize(void) {
|
||||
cleanup_hash:
|
||||
isc_hash_destroy();
|
||||
cleanup_db:
|
||||
#ifndef WIN32
|
||||
if (dbimp != NULL)
|
||||
dns_ecdb_unregister(&dbimp);
|
||||
cleanup_mctx:
|
||||
#endif
|
||||
if (dns_g_mctx != NULL)
|
||||
isc_mem_detach(&dns_g_mctx);
|
||||
}
|
||||
@@ -157,8 +163,10 @@ dns_lib_shutdown(void) {
|
||||
|
||||
dst_lib_destroy();
|
||||
isc_hash_destroy();
|
||||
#ifndef WIN32
|
||||
if (dbimp != NULL)
|
||||
dns_ecdb_unregister(&dbimp);
|
||||
#endif
|
||||
if (dns_g_mctx != NULL)
|
||||
isc_mem_detach(&dns_g_mctx);
|
||||
}
|
||||
|
Reference in New Issue
Block a user