diff options
Diffstat (limited to '')
-rw-r--r-- | src/Main.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Main.cxx b/src/Main.cxx index 2d25297c9..da8458340 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -79,7 +79,9 @@ #include "ArchiveList.hxx" #endif +#ifdef HAVE_GLIB #include <glib.h> +#endif #include <stdlib.h> @@ -92,6 +94,8 @@ #include <ws2tcpip.h> #endif +#include <limits.h> + static constexpr unsigned DEFAULT_BUFFER_SIZE = 4096; static constexpr unsigned DEFAULT_BUFFER_BEFORE_PLAY = 10; @@ -359,12 +363,14 @@ int mpd_main(int argc, char *argv[]) setlocale(LC_CTYPE,""); #endif +#ifdef HAVE_GLIB g_set_application_name("Music Player Daemon"); #if !GLIB_CHECK_VERSION(2,32,0) /* enable GLib's thread safety code */ g_thread_init(nullptr); #endif +#endif winsock_init(); io_thread_init(); @@ -473,7 +479,7 @@ int mpd_main(int argc, char *argv[]) } if (!glue_state_file_init(error)) { - g_printerr("%s\n", error.GetMessage()); + LogError(error); return EXIT_FAILURE; } |