aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_list.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-10 21:14:22 +0100
committerMax Kellermann <max@duempel.org>2009-11-10 21:14:22 +0100
commitb722d3d7f365b106794a3f40435ab220098959c5 (patch)
treefc539d0aa20b0357547ced148cc88f18f648d7fe /src/playlist_list.c
parentde57c21a3bec43bffb3fc6a85197f5489e18168f (diff)
downloadmpd-b722d3d7f365b106794a3f40435ab220098959c5.tar.gz
mpd-b722d3d7f365b106794a3f40435ab220098959c5.tar.xz
mpd-b722d3d7f365b106794a3f40435ab220098959c5.zip
configure.ac: require GLib 2.12
Drop the required GLib version from 2.16 to 2.12, because many current systems still don't have GLib 2.16. This requires several new compatibility functions in glib_compat.h.
Diffstat (limited to 'src/playlist_list.c')
-rw-r--r--src/playlist_list.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/playlist_list.c b/src/playlist_list.c
index 2c6237ed4..d6359463e 100644
--- a/src/playlist_list.c
+++ b/src/playlist_list.c
@@ -104,6 +104,18 @@ playlist_list_global_finish(void)
playlist_plugin_finish(playlist_plugins[i]);
}
+/* g_uri_parse_scheme() was introduced in GLib 2.16 */
+#if !GLIB_CHECK_VERSION(2,16,0)
+static char *
+g_uri_parse_scheme(const char *uri)
+{
+ const char *end = strstr(uri, "://");
+ if (end == NULL)
+ return NULL;
+ return g_strndup(uri, end - uri);
+}
+#endif
+
struct playlist_provider *
playlist_list_open_uri(const char *uri)
{