summaryrefslogtreecommitdiffstats
path: root/auth_mellon.h
diff options
context:
space:
mode:
Diffstat (limited to 'auth_mellon.h')
-rw-r--r--auth_mellon.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/auth_mellon.h b/auth_mellon.h
index c1c8086..12ff5a9 100644
--- a/auth_mellon.h
+++ b/auth_mellon.h
@@ -370,4 +370,26 @@ int am_httpclient_post_str(request_rec *r, const char *uri,
extern module AP_MODULE_DECLARE_DATA auth_mellon_module;
+/* Old glib compatibility */
+
+#if (GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION < 14)
+
+static void g_hash_table_get_keys_helper(gpointer key, gpointer value,
+ gpointer user_data)
+{
+ GList **out = user_data;
+
+ *out = g_list_prepend(*out, key);
+}
+
+static GList *g_hash_table_get_keys(GHashTable *ht)
+{
+ GList *ret = NULL;
+
+ g_hash_table_foreach(ht, g_hash_table_get_keys_helper, &ret);
+
+ return g_list_reverse(ret);
+}
+#endif
+
#endif /* MOD_AUTH_MELLON_H */