GNOME Bugzilla – Bug 780900
xmlStrPrintf prototype changed.
Last modified: 2017-04-04 13:17:32 UTC
I've found that xmlStrPrintf prototype has changed in 2.9.3 from XMLPUBFUN int XMLCALL xmlStrPrintf (xmlChar *buf, int len, const xmlChar *msg, ...); to XMLPUBFUN int XMLCALL xmlStrPrintf (xmlChar *buf, int len, const char *msg, ...) LIBXML_ATTR_FORMAT(3,4); I wanted to use LIBXML_VERSION to distinguish old and new prototypes to correctly cast in my code. But suddenly I found one platform (OpenWRT) where 2.9.3 still have the old prototype. Please suggest what to use during C preprocessor to test if the new prototype should be used. BTW, it is a bad idea to change function prototype ;(
Ah, the problem is just that you got the version number wrong. It changed in 2.9.4, not 2.9.3. See https://git.gnome.org/browse/libxml2/commit/?id=502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b If you have the newer prototype on 2.9.3, perhaps your distribution backported that patch manually.
Oh, this might explain the issue with wrong headers. I use Ubuntu with 2.9.3+dfsg1-1ubuntu0.2 package. And inside the header is already new with 2.3.9 version. Thanks for the info, this closes my issue. May be new one should be risen in Ubuntu, but I can workaround it by changing the file on my PC. Till next upgrade this is ok ;)