diff options
author | Max Kellermann <max@duempel.org> | 2011-08-29 08:25:11 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-08-29 09:39:03 +0200 |
commit | a769352a74bad0b3d34f73f1db6898799e88f6a3 (patch) | |
tree | 2c19d65796d58188cbc66825cbf19280fd5d8293 /src | |
parent | 8a63c279250f0e2297ad2fad5ac679ae1c95652b (diff) | |
download | mpd-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.h | 11 | ||||
-rw-r--r-- | src/output/raop_output_plugin.c | 1 |
2 files changed, 12 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 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 <glib.h> #include <unistd.h> |