1From f7a5ebc3a673b246a64c9a664df304c1520a3951 Mon Sep 17 00:00:00 2001 2From: Khem Raj <raj.khem@gmail.com> 3Date: Thu, 7 Mar 2024 12:35:17 -0800 4Subject: [PATCH] Make xmlError struct constant 5 6In libxml2 commit v2.12.0~14 the API changed so that 7xmlGetLastError() returns pointer to a constant xmlError struct. 8Reflect this change in our code. 9 10Upstream-Status: Pending 11Signed-off-by: Khem Raj <raj.khem@gmail.com> 12--- 13 src/xml.c | 2 +- 14 src/xmlstar.h | 2 +- 15 2 files changed, 2 insertions(+), 2 deletions(-) 16 17diff --git a/src/xml.c b/src/xml.c 18index cf47cc2..e6f19c1 100644 19--- a/src/xml.c 20+++ b/src/xml.c 21@@ -104,7 +104,7 @@ void reportGenericError(void* ctx, const char * msg, ...) { 22 /* by default all errors are reported */ 23 static ErrorInfo errorInfo = { NULL, NULL, VERBOSE, CONTINUE }; 24 25-void reportError(void *ptr, xmlErrorPtr error) 26+void reportError(void *ptr, const xmlError *error) 27 { 28 ErrorInfo *errorInfo = (ErrorInfo*) ptr; 29 assert(errorInfo); 30diff --git a/src/xmlstar.h b/src/xmlstar.h 31index 3e1eed3..7e41ac4 100644 32--- a/src/xmlstar.h 33+++ b/src/xmlstar.h 34@@ -32,7 +32,7 @@ typedef struct _errorInfo { 35 ErrorStop stop; 36 } ErrorInfo; 37 38-void reportError(void *ptr, xmlErrorPtr error); 39+void reportError(void *ptr, const xmlError* error); 40 void suppressErrors(void); 41 42 typedef struct _gOptions { 43-- 442.44.0 45 46