diff options
Diffstat (limited to 'src/system')
-rw-r--r-- | src/system/FatalError.cxx | 5 | ||||
-rw-r--r-- | src/system/SocketError.cxx | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/system/FatalError.cxx b/src/system/FatalError.cxx index f02b4b581..11a0944df 100644 --- a/src/system/FatalError.cxx +++ b/src/system/FatalError.cxx @@ -23,12 +23,15 @@ #include "util/Domain.hxx" #include "LogV.hxx" +#ifdef WIN32 #include <glib.h> +#endif #include <unistd.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> #ifdef WIN32 #include <windows.h> @@ -88,7 +91,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); diff --git a/src/system/SocketError.cxx b/src/system/SocketError.cxx index 315a86e1f..bb1fa5abf 100644 --- a/src/system/SocketError.cxx +++ b/src/system/SocketError.cxx @@ -21,7 +21,7 @@ #include "SocketError.hxx" #include "util/Domain.hxx" -#include <glib.h> +#include <string.h> const Domain socket_domain("socket"); @@ -41,6 +41,6 @@ SocketErrorMessage::SocketErrorMessage(socket_error_t code) #else SocketErrorMessage::SocketErrorMessage(socket_error_t code) - :msg(g_strerror(code)) {} + :msg(strerror(code)) {} #endif |