aports/testing/mapnik/libxml2.patch
Holger Jaekel 0fac8f2b71 testing/mapnik: rebuild against gdal 3.9.0
fix build with libxml2 2.12.x
fix build with boost 1.83
2024-05-18 21:03:46 +02:00

40 lines
1.5 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 8cdca5f5be97b9fb4de95e0214197f879e6fcfb7 Mon Sep 17 00:00:00 2001
From: David Hummel <6109326+hummeltech@users.noreply.github.com>
Date: Mon, 20 Nov 2023 10:21:12 -0700
Subject: [PATCH] Fix broken builds with libxml2 >= v2.12.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
**I.E.**
```
src/libxml2_loader.cpp:91:50: error: invalid conversion from const xmlError* {aka const _xmlError*} to xmlError* {aka _xmlError*} [-fpermissive]
src/libxml2_loader.cpp:131:50: error: invalid conversion from const xmlError* {aka const _xmlError*} to xmlError* {aka _xmlError*} [-fpermissive]
```
---
src/libxml2_loader.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libxml2_loader.cpp b/src/libxml2_loader.cpp
index 223d8df447..78dc8aa978 100644
--- a/src/libxml2_loader.cpp
+++ b/src/libxml2_loader.cpp
@@ -79,7 +79,7 @@ class libxml2_loader : util::noncopyable
if (!doc)
{
- xmlError * error = xmlCtxtGetLastError(ctx_);
+ const xmlError* error = xmlCtxtGetLastError(ctx_);
if (error)
{
std::string msg("XML document not well formed:\n");
@@ -118,7 +118,7 @@
if (!doc)
{
std::string msg("XML document not well formed");
- xmlError * error = xmlCtxtGetLastError( ctx_ );
+ const xmlError* error = xmlCtxtGetLastError(ctx_);
if (error)
{
msg += ":\n";