diff options
author | Max Kellermann <max@duempel.org> | 2009-01-15 09:20:01 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-15 09:20:01 +0100 |
commit | 08e18f70700110282899830201b731bca2616438 (patch) | |
tree | cd53964e2f7c52177a58d4bbe7a51c030547cade /src/input_curl.c | |
parent | 29baf0c190e9f5e2ccbd98cb8aa300ea91b194cd (diff) | |
download | mpd-08e18f70700110282899830201b731bca2616438.tar.gz mpd-08e18f70700110282899830201b731bca2616438.tar.xz mpd-08e18f70700110282899830201b731bca2616438.zip |
input_curl: added fallback for g_queue_clear()
g_queue_clear() was introduced in GLib 2.14. Add a macro hack for
older GLib versions to emulate it.
Diffstat (limited to 'src/input_curl.c')
-rw-r--r-- | src/input_curl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/input_curl.c b/src/input_curl.c index cb2127a4a..d3bc219c8 100644 --- a/src/input_curl.c +++ b/src/input_curl.c @@ -115,6 +115,11 @@ buffer_free_callback(gpointer data, G_GNUC_UNUSED gpointer user_data) g_free(data); } +/* g_queue_clear() was introduced in GLib 2.14 */ +#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 14 +#define g_queue_clear(q) do { g_queue_free(q); q = g_queue_new(); } while (0) +#endif + /** * Frees the current "libcurl easy" handle, and everything associated * with it. |