build: Add missing "static" keyword where it should be used
[platform/upstream/glib.git] / tests / child-test.c
index 4e46366..2fbc741 100644 (file)
@@ -146,6 +146,9 @@ test_thread (gpointer data)
 int
 main (int argc, char *argv[])
 {
+#ifndef TEST_THREAD
+  GPid pid;
+#endif
 #ifdef G_OS_WIN32
   argv0 = argv[0];
   if (argc > 1 && argv[1][0] == '-' && argv[1][1] == 'c')
@@ -160,21 +163,16 @@ main (int argc, char *argv[])
       exit (STILL_ACTIVE);
     }
 #endif
-  /* Only run the test, if threads are enabled and a default thread
-   * implementation is available.
-   */
-#if defined(G_THREADS_ENABLED) && ! defined(G_THREADS_IMPL_NONE)
+
 #ifdef TEST_THREAD
   g_thread_init (NULL);
-#else
-  GPid pid;
 #endif
   main_loop = g_main_loop_new (NULL, FALSE);
 
 #ifdef G_OS_WIN32
   system ("ipconfig /all");
 #else
-  system ("/bin/true");
+  system ("true");
 #endif
 
   alive = 2;
@@ -200,6 +198,5 @@ main (int argc, char *argv[])
       return 1;
     }
     
-#endif
    return 0;
 }