Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapserver: fix build with libxml2 2.12 #279418

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkgs/servers/geospatial/mapserver/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 39 additions & 0 deletions pkgs/servers/geospatial/mapserver/fix-build-w-libxml2-12.patch
Original file line number Diff line number Diff line change
@@ -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;