From a769352a74bad0b3d34f73f1db6898799e88f6a3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 29 Aug 2011 08:25:11 +0200 Subject: [PATCH] output/raop: fallback for g_set_error_literal() This function was added in GLib 2.18. Make the plugin compatible with older GLib versions. --- src/glib_compat.h | 11 +++++++++++ src/output/raop_output_plugin.c | 1 + 2 files changed, 12 insertions(+) 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 diff --git a/src/output/raop_output_plugin.c b/src/output/raop_output_plugin.c index 865978c82..a498ca670 100644 --- a/src/output/raop_output_plugin.c +++ b/src/output/raop_output_plugin.c @@ -20,6 +20,7 @@ #include "output_api.h" #include "mixer_list.h" #include "raop_output_plugin.h" +#include "glib_compat.h" #include #include