File: libxml-2.15.diff

package info (click to toggle)
xmlsec1 1.3.7-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 19,980 kB
  • sloc: ansic: 100,498; xml: 19,156; sh: 8,079; makefile: 1,186; javascript: 438; perl: 199
file content (33 lines) | stat: -rw-r--r-- 986 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
From ef0e3b5cac04db13ce070b1e5bcad7dd7b0eb49b Mon Sep 17 00:00:00 2001
From: lsh123 <aleksey@aleksey.com>
Date: Wed, 24 Sep 2025 10:14:12 -0400
Subject: [PATCH] Fix build for LibXML2 > 2.15.0 (#950)

---
 src/xmltree.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/xmltree.c b/src/xmltree.c
index 273355379..5ce90c0f4 100644
--- a/src/xmltree.c
+++ b/src/xmltree.c
@@ -24,6 +24,7 @@
 #include <libxml/valid.h>
 #include <libxml/xpath.h>
 #include <libxml/xpathInternals.h>
+#include <libxml/xmlversion.h>
 
 #include <xmlsec/xmlsec.h>
 #include <xmlsec/xmltree.h>
@@ -705,7 +706,11 @@ int
 xmlSecReplaceNodeBufferAndReturn(xmlNodePtr node, const xmlSecByte *buffer, xmlSecSize size, xmlNodePtr *replaced) {
     xmlNodePtr results = NULL;
     xmlNodePtr next = NULL;
+#if (LIBXML_VERSION >= 21500)
+    xmlChar *oldenc;
+#else  /* (LIBXML_VERSION >= 21500) */
     const xmlChar *oldenc;
+#endif /* (LIBXML_VERSION >= 21500) */
     int len;
     xmlParserErrors ret;