aboutsummaryrefslogtreecommitdiffstats
path: root/src/system/FatalError.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/system/FatalError.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/system/FatalError.cxx b/src/system/FatalError.cxx
index f02b4b581..b54a677f2 100644
--- a/src/system/FatalError.cxx
+++ b/src/system/FatalError.cxx
@@ -23,12 +23,15 @@
#include "util/Domain.hxx"
#include "LogV.hxx"
+#ifdef HAVE_GLIB
#include <glib.h>
+#endif
#include <unistd.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#ifdef WIN32
#include <windows.h>
@@ -75,12 +78,16 @@ FatalError(const char *msg, const Error &error)
FormatFatalError("%s: %s", msg, error.GetMessage());
}
+#ifdef HAVE_GLIB
+
void
FatalError(const char *msg, GError *error)
{
FormatFatalError("%s: %s", msg, error->message);
}
+#endif
+
void
FatalSystemError(const char *msg)
{
@@ -88,7 +95,7 @@ FatalSystemError(const char *msg)
#ifdef WIN32
system_error = g_win32_error_message(GetLastError());
#else
- system_error = g_strerror(errno);
+ system_error = strerror(errno);
#endif
FormatError(fatal_error_domain, "%s: %s", msg, system_error);