aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/LogBackend.hxx5
-rw-r--r--src/LogInit.cxx2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/LogBackend.hxx b/src/LogBackend.hxx
index 75a692ede..23df2037e 100644
--- a/src/LogBackend.hxx
+++ b/src/LogBackend.hxx
@@ -20,14 +20,19 @@
#ifndef MPD_LOG_BACKEND_HXX
#define MPD_LOG_BACKEND_HXX
+#include "check.h"
#include "LogLevel.hxx"
void
SetLogThreshold(LogLevel _threshold);
+#ifdef HAVE_GLIB
+
void
SetLogCharset(const char *_charset);
+#endif
+
void
EnableLogTimestamp();
diff --git a/src/LogInit.cxx b/src/LogInit.cxx
index 2a5d4d7c5..38dd5356b 100644
--- a/src/LogInit.cxx
+++ b/src/LogInit.cxx
@@ -190,7 +190,9 @@ void setup_log_output(bool use_stdout)
close(out_fd);
out_fd = -1;
+#ifdef HAVE_GLIB
SetLogCharset(nullptr);
+#endif
}
int cycle_log_files(void)