aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/FakeDecoderAPI.cxx2
-rw-r--r--test/dump_playlist.cxx4
-rw-r--r--test/dump_text_file.cxx4
-rw-r--r--test/read_tags.cxx4
-rw-r--r--test/run_filter.cxx4
-rw-r--r--test/run_normalize.cxx2
-rw-r--r--test/run_output.cxx4
7 files changed, 20 insertions, 4 deletions
diff --git a/test/FakeDecoderAPI.cxx b/test/FakeDecoderAPI.cxx
index 88db4a268..4dfc545ee 100644
--- a/test/FakeDecoderAPI.cxx
+++ b/test/FakeDecoderAPI.cxx
@@ -23,8 +23,6 @@
#include "util/Error.hxx"
#include "Compiler.h"
-#include <glib.h>
-
#include <unistd.h>
void
diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx
index d8a7c4bfa..9e2e10516 100644
--- a/test/dump_playlist.cxx
+++ b/test/dump_playlist.cxx
@@ -33,7 +33,9 @@
#include "thread/Cond.hxx"
#include "Log.hxx"
+#ifdef HAVE_GLIB
#include <glib.h>
+#endif
#include <unistd.h>
#include <stdlib.h>
@@ -53,9 +55,11 @@ int 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 */
diff --git a/test/dump_text_file.cxx b/test/dump_text_file.cxx
index e664c5a1b..a2fc10b3f 100644
--- a/test/dump_text_file.cxx
+++ b/test/dump_text_file.cxx
@@ -32,7 +32,9 @@
#include "archive/ArchiveList.hxx"
#endif
+#ifdef HAVE_GLIB
#include <glib.h>
+#endif
#include <unistd.h>
#include <stdio.h>
@@ -79,9 +81,11 @@ int 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 */
diff --git a/test/read_tags.cxx b/test/read_tags.cxx
index 89253a78d..c525c8064 100644
--- a/test/read_tags.cxx
+++ b/test/read_tags.cxx
@@ -32,7 +32,9 @@
#include "thread/Cond.hxx"
#include "Log.hxx"
+#ifdef HAVE_GLIB
#include <glib.h>
+#endif
#include <assert.h>
#include <unistd.h>
@@ -88,9 +90,11 @@ int main(int argc, char **argv)
decoder_name = argv[1];
const Path path = Path::FromFS(argv[2]);
+#ifdef HAVE_GLIB
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
+#endif
io_thread_init();
io_thread_start();
diff --git a/test/run_filter.cxx b/test/run_filter.cxx
index 7816827d7..c43144a10 100644
--- a/test/run_filter.cxx
+++ b/test/run_filter.cxx
@@ -32,7 +32,9 @@
#include "system/FatalError.hxx"
#include "Log.hxx"
+#ifdef HAVE_GLIB
#include <glib.h>
+#endif
#include <assert.h>
#include <string.h>
@@ -100,9 +102,11 @@ int main(int argc, char **argv)
/* initialize GLib */
+#ifdef HAVE_GLIB
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
+#endif
/* read configuration file (mpd.conf) */
diff --git a/test/run_normalize.cxx b/test/run_normalize.cxx
index 300dae1d3..9a361b790 100644
--- a/test/run_normalize.cxx
+++ b/test/run_normalize.cxx
@@ -30,8 +30,6 @@
#include "util/Error.hxx"
#include "stdbin.h"
-#include <glib.h>
-
#include <stddef.h>
#include <stdio.h>
#include <unistd.h>
diff --git a/test/run_output.cxx b/test/run_output.cxx
index 6a6400477..374a0ceca 100644
--- a/test/run_output.cxx
+++ b/test/run_output.cxx
@@ -37,7 +37,9 @@
#include "util/Error.hxx"
#include "Log.hxx"
+#ifdef HAVE_GLIB
#include <glib.h>
+#endif
#include <assert.h>
#include <string.h>
@@ -176,9 +178,11 @@ int main(int argc, char **argv)
AudioFormat audio_format(44100, SampleFormat::S16, 2);
+#ifdef HAVE_GLIB
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
+#endif
/* read configuration file (mpd.conf) */