Blob Blame History Raw
From de2f77ee6766fe933a1472200f5e08e7c5ba6f8c Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
Date: Thu, 30 Nov 2023 23:59:33 +0900
Subject: [PATCH] FIX: support compilation with libxml2 2.12.0

libxml2 2.12.0 now makes xmlGetLastError() return const pointer:
https://gitlab.gnome.org/GNOME/libxml2/-/commit/45470611b047db78106dcb2fdbd4164163c15ab7

Fix variable type using xmlGetLastError() as such.

Closes #357 .
---
 src/sbml/xml/LibXMLParser.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sbml/xml/LibXMLParser.cpp b/src/sbml/xml/LibXMLParser.cpp
index 01c6faba38..26bc704161 100644
--- a/src/sbml/xml/LibXMLParser.cpp
+++ b/src/sbml/xml/LibXMLParser.cpp
@@ -424,7 +424,7 @@ LibXMLParser::parseNext ()
 
   if ( xmlParseChunk(mParser, mBuffer, bytes, done) )
   {
-    xmlErrorPtr libxmlError = xmlGetLastError();
+    const xmlError* libxmlError = xmlGetLastError();
 
     // I tried reporting the message from libXML that's available in
     // libxmlError->message, but the thing is bogus: it will say things