File: 0001-misc-adjust-to-structured-error-callback-argument-ch.patch

package info (click to toggle)
lasso 2.8.2-9
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 21,624 kB
  • sloc: ansic: 38,304; xml: 23,941; python: 5,116; sh: 4,726; makefile: 1,003; php: 495; perl: 117
file content (47 lines) | stat: -rw-r--r-- 1,320 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From cbe2c45455d93ed793dc4be59e3d2d26f1bd1111 Mon Sep 17 00:00:00 2001
From: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date: Wed, 24 Jan 2024 15:15:39 +0100
Subject: [PATCH] misc: adjust to structured error callback argument change in
 libxml2 2.12 (#86080)

---
 NEWS              | 2 ++
 lasso/lasso.c     | 8 +++++++-
 lasso/xml/tools.c | 9 ++++++++-
 3 files changed, 17 insertions(+), 2 deletions(-)

--- a/lasso/lasso.c
+++ b/lasso/lasso.c
@@ -138,7 +138,13 @@
 #include "types.c"
 
 static void
-lasso_xml_structured_error_func(G_GNUC_UNUSED void *user_data, xmlErrorPtr error)
+lasso_xml_structured_error_func(G_GNUC_UNUSED void *user_data,
+#if LIBXML_VERSION >= 21200
+                                        const xmlError *error
+#else
+                                        xmlErrorPtr error
+#endif
+				)
 {
 	g_log("libxml2", G_LOG_LEVEL_DEBUG, "libxml2: %s", error->message);
 }
--- a/lasso/xml/tools.c
+++ b/lasso/xml/tools.c
@@ -1449,7 +1449,14 @@
 	}
 }
 
-static void structuredErrorFunc (void *userData, xmlErrorPtr error) {
+static void structuredErrorFunc (void *userData,
+#if LIBXML_VERSION >= 21200
+                                        const xmlError *error
+#else
+                                        xmlErrorPtr error
+#endif
+				 )
+{
 		*(int*)userData = error->code;
 }