2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Add missing initialisations

configuring with --enable-mutex-atomics flagged these incorrectly
initialised variables on systems where pthread_mutex_init doesn't
just zero out the structure.
This commit is contained in:
Mark Andrews
2021-05-26 17:55:43 +10:00
parent 5a10cde89a
commit 715a2c7fc1
10 changed files with 47 additions and 7 deletions

View File

@@ -114,9 +114,11 @@
#endif /* ifndef NS_CLIENT_DROPPORT */
#if defined(_WIN32) && !defined(_WIN64)
LIBNS_EXTERNAL_DATA atomic_uint_fast32_t ns_client_requests;
LIBNS_EXTERNAL_DATA atomic_uint_fast32_t ns_client_requests =
ATOMIC_VAR_INIT(0);
#else /* if defined(_WIN32) && !defined(_WIN64) */
LIBNS_EXTERNAL_DATA atomic_uint_fast64_t ns_client_requests;
LIBNS_EXTERNAL_DATA atomic_uint_fast64_t ns_client_requests =
ATOMIC_VAR_INIT(0);
#endif /* if defined(_WIN32) && !defined(_WIN64) */
static void