You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sane-airscan/SOURCES/0002-Fixed-build-with-recen...

34 lines
1.1 KiB

From 144e7d4187c73566ffc2780ac91ab7e1826826e0 Mon Sep 17 00:00:00 2001
From: Alexander Pevzner <pzz@apevzner.com>
Date: Sat, 2 Dec 2023 22:29:55 +0300
Subject: [PATCH 2/2] Fixed build with recent versions of libxml2 (fixes #305)
libxml2 recently changed a prototype of the xmlStructuredErrorFunc callback,
adding const modifier to the second parameter.
Adding an explicit cast seems to fix the problem (but I will not be surprised, if
this fix will not work equally well on all distros).
Found for a first time and fixed on Arch linux on about 2 Dec 2023 (Arch is rolling
release, so there is no explicit release number)
---
airscan-xml.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airscan-xml.c b/airscan-xml.c
index 5071ca9..10f290c 100644
--- a/airscan-xml.c
+++ b/airscan-xml.c
@@ -124,7 +124,7 @@ xml_rd_parse (xmlDoc **doc, const char *xml_text, size_t xml_len)
goto DONE;
}
- ctxt->sax->serror = xml_rd_error_callback;
+ ctxt->sax->serror = (xmlStructuredErrorFunc) xml_rd_error_callback;
/* Parse the document */
if (xmlCtxtResetPush(ctxt, xml_text, xml_len, NULL, NULL)) {
--
2.43.0