diff --git a/dbug/dbug_analyze.c b/dbug/dbug_analyze.c
index 8cd0af4f7e0bd88a663202021397d011625f52b7..3263b2ccc59f1f09246d746cabce137a5ba4cc47 100644
--- a/dbug/dbug_analyze.c
+++ b/dbug/dbug_analyze.c
@@ -574,10 +574,12 @@ int main (int argc, char **argv)
     FILE *infile;
     FILE *outfile = {stdout};
 
-#if defined(HAVE_PTHREAD_INIT) && defined(THREAD)
+#ifdef THREAD
+#if defined(HAVE_PTHREAD_INIT)
   pthread_init();                       /* Must be called before DBUG_ENTER */
 #endif
   my_thread_global_init();
+#endif /* THREAD */
   {
     DBUG_ENTER ("main");
     DBUG_PROCESS (argv[0]);