aboutsummaryrefslogtreecommitdiffstats
path: root/src/glib_compat.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-08-29 08:25:11 +0200
committerMax Kellermann <max@duempel.org>2011-08-29 09:39:03 +0200
commita769352a74bad0b3d34f73f1db6898799e88f6a3 (patch)
tree2c19d65796d58188cbc66825cbf19280fd5d8293 /src/glib_compat.h
parent8a63c279250f0e2297ad2fad5ac679ae1c95652b (diff)
downloadmpd-a769352a74bad0b3d34f73f1db6898799e88f6a3.tar.gz
mpd-a769352a74bad0b3d34f73f1db6898799e88f6a3.tar.xz
mpd-a769352a74bad0b3d34f73f1db6898799e88f6a3.zip
output/raop: fallback for g_set_error_literal()
This function was added in GLib 2.18. Make the plugin compatible with older GLib versions.
Diffstat (limited to '')
-rw-r--r--src/glib_compat.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/glib_compat.h b/src/glib_compat.h
index 35ec77df6..8307997d5 100644
--- a/src/glib_compat.h
+++ b/src/glib_compat.h
@@ -80,4 +80,15 @@ g_uri_parse_scheme(const char *uri)
#endif
+#if !GLIB_CHECK_VERSION(2,18,0)
+
+static inline void
+g_set_error_literal(GError **err, GQuark domain, gint code,
+ const gchar *message)
+{
+ g_set_error(err, domain, code, "%s", message);
+}
+
+#endif
+
#endif