summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Untz <vuntz@gnome.org>2012-04-03 14:07:50 +0200
committerVincent Untz <vuntz@gnome.org>2012-04-03 14:07:50 +0200
commit56eddf4ce5008dc95e2b3725684aa2b7cb053c54 (patch)
tree7f53cdf85037de2272203565ac644a5281aa9b97
parente82a75619484c8a5362787187871ae1d04cf006c (diff)
install: Do not require glib >= 2.28
We still only check for an older version of glib, and requiring 2.28 just for g_slist_free_full() can be silly. So if we don't have 2.28, just use the equivalent trivial code. https://bugs.freedesktop.org/show_bug.cgi?id=48133
-rw-r--r--src/install.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/install.c b/src/install.c
index 30b651b..19a7aec 100644
--- a/src/install.c
+++ b/src/install.c
@@ -940,7 +940,12 @@ main (int argc, char **argv)
}
}
+#if GLIB_CHECK_VERSION(2,28,0)
g_slist_free_full (edit_actions, (GDestroyNotify) dfu_edit_action_free);
+#else
+ g_slist_foreach (edit_actions, (GFunc) dfu_edit_action_free, NULL);
+ g_slist_free (edit_actions);
+#endif
g_option_context_free (context);