Skip to content

Commit

Permalink
Fixed build with recent versions of libxml2 (fixes #305)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
alexpevzner committed Dec 2, 2023
1 parent c042a68 commit 144e7d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airscan-xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 144e7d4

Please sign in to comment.