]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
timer_test failed to compile if cmocka was enabled but threads were not
authorEvan Hunt <each@isc.org>
Wed, 20 Feb 2019 21:31:45 +0000 (13:31 -0800)
committerEvan Hunt <each@isc.org>
Wed, 20 Feb 2019 21:35:51 +0000 (13:35 -0800)
lib/isc/tests/timer_test.c

index 891dce557f7405699a24416b74e64bdb78f8d497..f69f2b32e4303f59f32778df6507ddd156a0191e 100644 (file)
 
 #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 */