test/DumpDatabase, ...: no g_thread_init() calls when GLib is disabled

This commit is contained in:
Max Kellermann
2014-10-24 18:30:30 +02:00
parent a7b09d3d1c
commit 6cf1acfb48
3 changed files with 12 additions and 0 deletions

View File

@@ -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,8 +109,10 @@ 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 */