From cc282c00d271ad0a9cd911951aa7d2658b3bb6b3 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 20 Jun 2019 08:22:56 -0400 Subject: Fix build with older GLib Turns out g_strv_equal is recent. --- testsuite/gtk/action.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'testsuite') diff --git a/testsuite/gtk/action.c b/testsuite/gtk/action.c index 7ca703bf78..a21fa611b1 100644 --- a/testsuite/gtk/action.c +++ b/testsuite/gtk/action.c @@ -72,6 +72,27 @@ menu_item_label_notify_count (ActionTest *fixture, g_object_unref (item); } +#if !GLIB_CHECK_VERSION(2,60,0) +gboolean +g_strv_equal (const gchar * const *strv1, + const gchar * const *strv2) +{ + g_return_val_if_fail (strv1 != NULL, FALSE); + g_return_val_if_fail (strv2 != NULL, FALSE); + + if (strv1 == strv2) + return TRUE; + + for (; *strv1 != NULL && *strv2 != NULL; strv1++, strv2++) + { + if (!g_str_equal (*strv1, *strv2)) + return FALSE; + } + + return (*strv1 == NULL && *strv2 == NULL); +} +#endif + static void g_test_action_muxer (void) { -- cgit v1.2.1