aboutsummaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-15 18:30:25 +0100
committerMax Kellermann <max@duempel.org>2013-12-15 18:32:07 +0100
commit777844ae0c0c24720efc1288bb20f12b191e5bdf (patch)
tree8120bb3baeb666675c41e5101e84acb81fda4cf6 /src/util
parenta10a4ad90087a21439d08b145f1a8c449c7867de (diff)
downloadmpd-777844ae0c0c24720efc1288bb20f12b191e5bdf.tar.gz
mpd-777844ae0c0c24720efc1288bb20f12b191e5bdf.tar.xz
mpd-777844ae0c0c24720efc1288bb20f12b191e5bdf.zip
system/SocketError, ...: use strerror() instead of g_strerror()
Avoid GLib.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/Error.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/util/Error.cxx b/src/util/Error.cxx
index 5675f4d81..99695f0d1 100644
--- a/src/util/Error.cxx
+++ b/src/util/Error.cxx
@@ -21,11 +21,14 @@
#include "Error.hxx"
#include "Domain.hxx"
+#ifdef WIN32
#include <glib.h>
+#endif
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
+#include <string.h>
const Domain errno_domain("errno");
@@ -70,7 +73,7 @@ Error::FormatPrefix(const char *fmt, ...)
void
Error::SetErrno(int e)
{
- Set(errno_domain, e, g_strerror(e));
+ Set(errno_domain, e, strerror(e));
}
void
@@ -82,7 +85,7 @@ Error::SetErrno()
void
Error::SetErrno(int e, const char *prefix)
{
- Format(errno_domain, e, "%s: %s", prefix, g_strerror(e));
+ Format(errno_domain, e, "%s: %s", prefix, strerror(e));
}
void