Fixes the following error /home/builder/.termux-build/postgresql/src/src/backend/utils/adt/xml.c:1177:45: error: incompatible function pointer types passing 'void (void *, xmlErrorPtr)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types] xmlSetStructuredErrorFunc((void *) errcxt, xml_errorHandler); ^~~~~~~~~~~~~~~~ /data/data/com.termux/files/usr/include/libxml2/libxml/xmlerror.h:898:29: note: passing argument to parameter 'handler' here xmlStructuredErrorFunc handler); ^ --- a/src/backend/utils/adt/xml.c +++ b/src/backend/utils/adt/xml.c @@ -123,7 +123,7 @@ xmlParserCtxtPtr ctxt); static void xml_errsave(Node *escontext, PgXmlErrorContext *errcxt, int sqlcode, const char *msg); -static void xml_errorHandler(void *data, xmlErrorPtr error); +static void xml_errorHandler(void *data, const struct _xmlError *error); static int errdetail_for_xml_code(int code); static void chopStringInfoNewlines(StringInfo str); static void appendStringInfoLineSeparator(StringInfo str); @@ -2002,7 +2002,7 @@ * Error handler for libxml errors and warnings */ static void -xml_errorHandler(void *data, xmlErrorPtr error) +xml_errorHandler(void *data, const struct _xmlError *error) { PgXmlErrorContext *xmlerrcxt = (PgXmlErrorContext *) data; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) error->ctxt;