Okey so all issues that libxml2 wanted to fix are on their latest upstream now.
Only remaining fix is for the function pointer that changed. They suggested that 0ad should fix this. They also linked a commit from WebKit fixing it.
https://github.com/WebKit/WebKit/commit/1bad176b2496579d760852c80cff3ad9fb7c3a4b
I used this patch as a base for the same issue on the 0ad side.
Casting the function pointer to `xmlStructuredErrorFunc` would have also worked, but it would be less clean in my opinion.
Error:
../../../source/ps/XML/RelaxNG.cpp:162:50: error: invalid conversion from ‘void (*)(void*, xmlErrorPtr)’ {aka ‘void (*)(void*, _xmlError*)’} to ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void*, const _xmlError*)’} [-fpermissive]
162 | xmlRelaxNGSetValidStructuredErrors(ctxt, &relaxNGErrorHandler, NULL);
| ^~~~~~~~~~~~~~~~~~~~
| |
| void (*)(void*, xmlErrorPtr) {aka void (*)(void*, _xmlError*)}
../../../source/ps/XML/Xeromyces.cpp:59:41: error: invalid conversion from ‘void (*)(void*, xmlErrorPtr)’ {aka ‘void (*)(void*, _xmlError*)’} to ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void*, const _xmlError*)’} [-fpermissive]
59 | xmlSetStructuredErrorFunc(NULL, &errorHandler);
| ^~~~~~~~~~~~~
| |
| void (*)(void*, xmlErrorPtr) {aka void (*)(void*, _xmlError*)}
libxml2_fix.patch