aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/AllocatedPath.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-17 22:48:26 +0100
committerMax Kellermann <max@duempel.org>2014-02-17 22:48:26 +0100
commitce925ba56fdcdf6168db7597185f6c34643a7501 (patch)
tree158c3583c8ba7b11d244eb5287a528499c95f135 /src/fs/AllocatedPath.cxx
parent4ad14f6a2c58854c3a00fb44bf5fa5340fe6a5c9 (diff)
downloadmpd-ce925ba56fdcdf6168db7597185f6c34643a7501.tar.gz
mpd-ce925ba56fdcdf6168db7597185f6c34643a7501.tar.xz
mpd-ce925ba56fdcdf6168db7597185f6c34643a7501.zip
fs/Charset: disable if GLib is disabled
Diffstat (limited to '')
-rw-r--r--src/fs/AllocatedPath.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/fs/AllocatedPath.cxx b/src/fs/AllocatedPath.cxx
index 6770fa1b0..30ce7e3a9 100644
--- a/src/fs/AllocatedPath.cxx
+++ b/src/fs/AllocatedPath.cxx
@@ -24,22 +24,32 @@
#include "util/Error.hxx"
#include "Compiler.h"
+#ifdef HAVE_GLIB
#include <glib.h>
+#endif
#include <string.h>
+#ifdef HAVE_GLIB
+
inline AllocatedPath::AllocatedPath(Donate, pointer _value)
:value(_value) {
g_free(_value);
}
+#endif
+
/* no inlining, please */
AllocatedPath::~AllocatedPath() {}
AllocatedPath
AllocatedPath::FromUTF8(const char *path_utf8)
{
+#ifdef HAVE_GLIB
return AllocatedPath(Donate(), ::PathFromUTF8(path_utf8));
+#else
+ return FromFS(path_utf8);
+#endif
}
AllocatedPath