SuccessChanges

Summary

  1. bindings/xml/libxml_xmlparser.c: add stdlib.h include (details)
  2. bindings/xml/libxml_xmlparser.c: update for libxml2 >= 2.12.0 (details)
Commit 885dba86dd2faef25444d576a7b8a367f2688ed9 by John-Mark Bell
bindings/xml/libxml_xmlparser.c: add stdlib.h include
This file uses malloc() but does not include stdlib.h directly. With
glibc, that apparently works out just fine... but with musl, it leads to
implicit declaration warnings/errors, most likely because musl does not
include stdlib.h transitively via any of the other headers used by this
file.
The file was modifiedbindings/xml/libxml_xmlparser.c
Commit 251165e9d81815f0fc99eddffdc19e953aeac3d4 by John-Mark Bell
bindings/xml/libxml_xmlparser.c: update for libxml2 >= 2.12.0
Version 2.12.0 of libxml2 changes a few functions to return (const
xmlError *) where previously they returned only (xmlError *). Compilers
generally are not happy with this. For example,
  bindings/xml/libxml_xmlparser.c: In function
'xml_parser_start_document':
bindings/xml/libxml_xmlparser.c:327:16: error: assignment discards
'const'
qualifier from pointer target type [-Werror=discarded-qualifiers]
327 |         xmlerr = xmlCtxtGetLastError(parser->xml_ctx);
This commit adds a few #ifdefs to handle both versions of the API
cleanly. It's probably not the sexiest fix, but it's simple and gets the
job done.
The file was modifiedbindings/xml/libxml_xmlparser.c