aboutsummaryrefslogtreecommitdiffstats
path: root/src/LogInit.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/LogInit.cxx')
-rw-r--r--src/LogInit.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/LogInit.cxx b/src/LogInit.cxx
index 42d86951f..bd858a32c 100644
--- a/src/LogInit.cxx
+++ b/src/LogInit.cxx
@@ -31,13 +31,16 @@
#include "util/Domain.hxx"
#include "system/FatalError.hxx"
+#ifdef HAVE_GLIB
+#include <glib.h>
+#endif
+
#include <assert.h>
#include <string.h>
#include <fcntl.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
-#include <glib.h>
#define LOG_LEVEL_SECURE LogLevel::INFO
@@ -110,9 +113,11 @@ log_init(bool verbose, bool use_stdout, Error &error)
{
const struct config_param *param;
+#ifdef HAVE_GLIB
const char *charset;
g_get_charset(&charset);
SetLogCharset(charset);
+#endif
if (verbose)
SetLogThreshold(LogLevel::DEBUG);