diff options
-rw-r--r-- | test/DumpDatabase.cxx | 4 | ||||
-rw-r--r-- | test/read_mixer.cxx | 4 | ||||
-rw-r--r-- | test/visit_archive.cxx | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/test/DumpDatabase.cxx b/test/DumpDatabase.cxx index d5b6f2223..07f342319 100644 --- a/test/DumpDatabase.cxx +++ b/test/DumpDatabase.cxx @@ -33,7 +33,9 @@ #include "event/Loop.hxx" #include "util/Error.hxx" +#ifdef HAVE_GLIB #include <glib.h> +#endif #include <iostream> using std::cout; @@ -107,9 +109,11 @@ main(int argc, char **argv) /* initialize GLib */ +#ifdef HAVE_GLIB #if !GLIB_CHECK_VERSION(2,32,0) g_thread_init(nullptr); #endif +#endif /* initialize MPD */ diff --git a/test/read_mixer.cxx b/test/read_mixer.cxx index 97529057f..de77a00c4 100644 --- a/test/read_mixer.cxx +++ b/test/read_mixer.cxx @@ -28,7 +28,9 @@ #include "util/Error.hxx" #include "Log.hxx" +#ifdef HAVE_GLIB #include <glib.h> +#endif #include <assert.h> #include <string.h> @@ -50,9 +52,11 @@ int main(int argc, gcc_unused char **argv) return EXIT_FAILURE; } +#ifdef HAVE_GLIB #if !GLIB_CHECK_VERSION(2,32,0) g_thread_init(NULL); #endif +#endif EventLoop event_loop; diff --git a/test/visit_archive.cxx b/test/visit_archive.cxx index f5dba5c8e..1ff3ba484 100644 --- a/test/visit_archive.cxx +++ b/test/visit_archive.cxx @@ -30,7 +30,9 @@ #include "fs/Path.hxx" #include "util/Error.hxx" +#ifdef HAVE_GLIB #include <glib.h> +#endif #include <unistd.h> #include <stdlib.h> @@ -57,9 +59,11 @@ main(int argc, char **argv) /* initialize GLib */ +#ifdef HAVE_GLIB #if !GLIB_CHECK_VERSION(2,32,0) g_thread_init(NULL); #endif +#endif /* initialize MPD */ |