From 4c15bbfb5045902dc917d3458a71b7e057ff0982 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Wed, 20 Feb 2019 13:31:45 -0800 Subject: [PATCH] timer_test failed to compile if cmocka was enabled but threads were not (cherry picked from commit c73e3175c737fd51a8e398286e14e93a3b5d124f) --- lib/isc/tests/timer_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/isc/tests/timer_test.c b/lib/isc/tests/timer_test.c index 891dce557f7..f69f2b32e43 100644 --- a/lib/isc/tests/timer_test.c +++ b/lib/isc/tests/timer_test.c @@ -36,14 +36,14 @@ #include "isctest.h" +/* Set to true (or use -v option) for verbose output */ +static bool verbose = false; + /* * This entire test requires threads. */ #ifdef ISC_PLATFORM_USETHREADS -/* Set to true (or use -v option) for verbose output */ -static bool verbose = false; - #define FUDGE_SECONDS 0 /* in absence of clock_getres() */ #define FUDGE_NANOSECONDS 500000000 /* in absence of clock_getres() */ @@ -569,6 +569,7 @@ purge(void **state) { isc_task_destroy(&task2); DESTROYLOCK(&mx); } +#endif int main(int argc, char **argv) { @@ -595,7 +596,6 @@ main(int argc, char **argv) { return (cmocka_run_group_tests(tests, NULL, NULL)); } -#endif #else /* HAVE_CMOCKA */ -- 2.47.3