mapserver: fix build with libxml2 2.12

This commit is contained in:
Ivan Mincik 2024-01-07 18:22:06 +01:00
parent bb7d124cb5
commit b91c469103
2 changed files with 44 additions and 0 deletions

View File

@ -15,6 +15,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-fAf4kOe/6bQW0i46+EZbD/6iWI2Bjkn2no6XeR/+mg4=";
};
patches = [
# drop this patch for version 8.0.2
./fix-build-w-libxml2-12.patch
];
nativeBuildInputs = [
cmake
pkg-config

View File

@ -0,0 +1,39 @@
diff --git a/mapows.c b/mapows.c
index f141a7b..5a94ecb 100644
--- a/mapows.c
+++ b/mapows.c
@@ -168,7 +168,7 @@ static int msOWSPreParseRequest(cgiRequestObj *request,
#endif
if (ows_request->document == NULL
|| (root = xmlDocGetRootElement(ows_request->document)) == NULL) {
- xmlErrorPtr error = xmlGetLastError();
+ const xmlError *error = xmlGetLastError();
msSetError(MS_OWSERR, "XML parsing error: %s",
"msOWSPreParseRequest()", error->message);
return MS_FAILURE;
diff --git a/mapwcs.cpp b/mapwcs.cpp
index 70e63b8..19afa79 100644
--- a/mapwcs.cpp
+++ b/mapwcs.cpp
@@ -362,7 +362,7 @@ static int msWCSParseRequest(cgiRequestObj *request, wcsParamsObj *params, mapOb
/* parse to DOM-Structure and get root element */
if((doc = xmlParseMemory(request->postrequest, strlen(request->postrequest)))
== NULL) {
- xmlErrorPtr error = xmlGetLastError();
+ const xmlError *error = xmlGetLastError();
msSetError(MS_WCSERR, "XML parsing error: %s",
"msWCSParseRequest()", error->message);
return MS_FAILURE;
diff --git a/mapwcs20.cpp b/mapwcs20.cpp
index b35e803..2431bdc 100644
--- a/mapwcs20.cpp
+++ b/mapwcs20.cpp
@@ -1446,7 +1446,7 @@ int msWCSParseRequest20(mapObj *map,
/* parse to DOM-Structure and get root element */
if(doc == NULL) {
- xmlErrorPtr error = xmlGetLastError();
+ const xmlError *error = xmlGetLastError();
msSetError(MS_WCSERR, "XML parsing error: %s",
"msWCSParseRequest20()", error->message);
return MS_FAILURE;