aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-15 09:16:20 +0100
committerMax Kellermann <max@duempel.org>2009-01-15 09:16:20 +0100
commit2151e2ea53d124af100c573024d8e1626c8d4390 (patch)
treea2981a12a5abfa9830cf04b36333a5f27142527d /src
parent6139174d8182ac6dcb8fc661d4abfaee7ba5a946 (diff)
downloadmpd-2151e2ea53d124af100c573024d8e1626c8d4390.tar.gz
mpd-2151e2ea53d124af100c573024d8e1626c8d4390.tar.xz
mpd-2151e2ea53d124af100c573024d8e1626c8d4390.zip
mapper: check if g_get_user_special_dir() is supported by GLib
g_get_user_special_dir() was introduced with GLib 2.14. Don't use it in older versions.
Diffstat (limited to '')
-rw-r--r--src/mapper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mapper.c b/src/mapper.c
index 2b3533a4d..642822c3f 100644
--- a/src/mapper.c
+++ b/src/mapper.c
@@ -51,10 +51,12 @@ void mapper_init(void)
if (music_dir_param != NULL) {
music_dir = g_strdup(music_dir_param->value);
} else {
+#if GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 14)
music_dir = g_strdup(g_get_user_special_dir(G_USER_DIRECTORY_MUSIC));
if (music_dir == NULL)
/* GLib failed to determine the XDG music
directory - abort */
+#endif
g_error("config parameter \"%s\" not found\n", CONF_MUSIC_DIR);
}