summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--share/doc/readme.md2
-rw-r--r--src/common/servlist.c35
3 files changed, 37 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 2fc226b8..56a7abe1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -184,7 +184,7 @@ dnl *********************************************************************
 dnl ** GLIB *************************************************************
 dnl *********************************************************************
 
-AM_PATH_GLIB_2_0(2.34.0, glib=yes, glib=no)
+AM_PATH_GLIB_2_0(2.28.0, glib=yes, glib=no)
 if test "$glib" = no; then
 	AC_MSG_ERROR(Cannot find GLib!)
 fi
diff --git a/share/doc/readme.md b/share/doc/readme.md
index 7f490ce0..dc66e0ac 100644
--- a/share/doc/readme.md
+++ b/share/doc/readme.md
@@ -22,7 +22,7 @@ in general. HexChat runs on most BSD and POSIX compliant operating systems.
 ## Requirements:
 
  * GTK+ 2.24
- * GLib 2.34
+ * GLib 2.28
 
 HexChat is known to work on, at least:
 
diff --git a/src/common/servlist.c b/src/common/servlist.c
index 7c1789a9..83815c9f 100644
--- a/src/common/servlist.c
+++ b/src/common/servlist.c
@@ -581,6 +581,41 @@ static const struct defaultserver def[] =
 
 GSList *network_list = 0;
 
+#if !GLIB_CHECK_VERSION(2,34,0)
+#define g_slist_copy_deep servlist_slist_copy_deep
+/* FIXME copy-paste from gslist.c, should be dumped sometime */
+static GSList*
+servlist_slist_copy_deep (GSList *list, GCopyFunc func, gpointer user_data)
+{
+  GSList *new_list = NULL;
+
+  if (list)
+    {
+      GSList *last;
+
+      new_list = g_slice_new (GSList);
+      if (func)
+        new_list->data = func (list->data, user_data);
+      else
+        new_list->data = list->data;
+      last = new_list;
+      list = list->next;
+      while (list)
+        {
+          last->next = g_slice_new (GSList);
+          last = last->next;
+          if (func)
+            last->data = func (list->data, user_data);
+          else
+            last->data = list->data;
+          list = list->next;
+        }
+      last->next = NULL;
+    }
+
+  return new_list;
+}
+#endif
 
 void
 servlist_connect (session *sess, ircnet *net, gboolean join)