diff options
Diffstat (limited to 'src/system/FatalError.cxx')
-rw-r--r-- | src/system/FatalError.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/system/FatalError.cxx b/src/system/FatalError.cxx index f02b4b581..35e94f169 100644 --- a/src/system/FatalError.cxx +++ b/src/system/FatalError.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2013 The Music Player Daemon Project + * Copyright (C) 2003-2014 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -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> @@ -76,19 +79,13 @@ FatalError(const char *msg, const Error &error) } void -FatalError(const char *msg, GError *error) -{ - FormatFatalError("%s: %s", msg, error->message); -} - -void FatalSystemError(const char *msg) { const char *system_error; #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); |