From: Ondřej Surý Date: Wed, 4 Dec 2019 09:41:40 +0000 (+0100) Subject: Remove use of PTHREAD_MUTEX_INITIALIZER in tests X-Git-Tag: v9.15.8~19^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afc4867e999926f93af4f29c3f0c8ca9fe1f1a08;p=thirdparty%2Fbind9.git Remove use of PTHREAD_MUTEX_INITIALIZER in tests Remove the pthread specific static initializer in favor of dynamic initialization. --- diff --git a/lib/isc/tests/timer_test.c b/lib/isc/tests/timer_test.c index 22325d4a388..190bcaf6b07 100644 --- a/lib/isc/tests/timer_test.c +++ b/lib/isc/tests/timer_test.c @@ -48,7 +48,7 @@ static isc_timer_t *timer = NULL; static isc_condition_t cv; static isc_mutex_t mx; static isc_time_t endtime; -static isc_mutex_t lasttime_mx = PTHREAD_MUTEX_INITIALIZER; +static isc_mutex_t lasttime_mx; static isc_time_t lasttime; static int seconds; static int nanoseconds; @@ -112,6 +112,7 @@ setup_test(isc_timertype_t timertype, isc_time_t *expires, atomic_init(&eventcnt, 0); isc_mutex_init(&mx); + isc_mutex_init(&lasttime_mx); isc_condition_init(&cv);