at master 53 lines 1.6 kB view raw
1From 1bf9184e1208e805f70ccb8ba06b4c3d63a1a04a Mon Sep 17 00:00:00 2001 2From: Benjamin Dauvergne <bdauvergne@entrouvert.com> 3Date: Wed, 24 Jan 2024 15:15:39 +0100 4Subject: [PATCH] misc: adjust to structured error callback argument change in 5 libxml2 2.12 (#86080) 6 7--- 8 lasso/lasso.c | 8 +++++++- 9 lasso/xml/tools.c | 9 ++++++++- 10 2 files changed, 15 insertions(+), 2 deletions(-) 11 12diff --git a/lasso/lasso.c b/lasso/lasso.c 13index 9902512f..7ea5df44 100644 14--- a/lasso/lasso.c 15+++ b/lasso/lasso.c 16@@ -138,7 +138,13 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) 17 #include "types.c" 18 19 static void 20-lasso_xml_structured_error_func(G_GNUC_UNUSED void *user_data, xmlErrorPtr error) 21+lasso_xml_structured_error_func(G_GNUC_UNUSED void *user_data, 22+#if LIBXML_VERSION >= 21200 23+ const xmlError *error 24+#else 25+ xmlErrorPtr error 26+#endif 27+ ) 28 { 29 g_log("libxml2", G_LOG_LEVEL_DEBUG, "libxml2: %s", error->message); 30 } 31diff --git a/lasso/xml/tools.c b/lasso/xml/tools.c 32index 385858d1..014f4040 100644 33--- a/lasso/xml/tools.c 34+++ b/lasso/xml/tools.c 35@@ -1449,7 +1449,14 @@ lasso_concat_url_query(const char *url, const char *query) 36 } 37 } 38 39-static void structuredErrorFunc (void *userData, xmlErrorPtr error) { 40+static void structuredErrorFunc (void *userData, 41+#if LIBXML_VERSION >= 21200 42+ const xmlError *error 43+#else 44+ xmlErrorPtr error 45+#endif 46+ ) 47+{ 48 *(int*)userData = error->code; 49 } 50 51-- 522.49.0 53