fix: dev: Fix one-definition-rule violation in the tests/ns

Move the client_addrs and client_refs to libtest to prevent this.

Merge branch 'ondrej/fix-odr-violation' into 'main'

See merge request isc-projects/bind9!10771
This commit is contained in:
Ondřej Surý 2025-07-24 11:29:20 +02:00
commit 30753f7723
2 changed files with 5 additions and 2 deletions

View file

@ -55,6 +55,9 @@ dns_dispatchmgr_t *dispatchmgr = NULL;
ns_interfacemgr_t *interfacemgr = NULL;
ns_server_t *sctx = NULL;
atomic_uint_fast32_t client_refs[32];
atomic_uintptr_t client_addrs[32];
static isc_result_t
matchview(isc_netaddr_t *srcaddr, isc_netaddr_t *destaddr,
dns_message_t *message, dns_aclenv_t *env, ns_server_t *lsctx,

View file

@ -21,6 +21,8 @@
#include <ns/client.h>
#include <tests/ns.h>
#if ISC_NETMGR_TRACE
#define FLARG \
, const char *func ISC_ATTR_UNUSED, const char *file ISC_ATTR_UNUSED, \
@ -32,8 +34,6 @@
/*
* We don't want to use netmgr-based client accounting, we need to emulate it.
*/
atomic_uint_fast32_t client_refs[32];
atomic_uintptr_t client_addrs[32];
#if ISC_NETMGR_TRACE
void