# HG changeset patch # User Chun-wei Fan <fanchunwei@src.gnome.org> # Date 1669004650 -28800 # Mon Nov 21 12:24:10 2022 +0800 # Node ID 4dab6613f318c09cfd09b0321417781494feafc5 # Parent b5eaa60d14766a859cc6d1c9e4d10cb98911c5e7 python/types.c: Fix building against older libxml2 The XML_IGNORE_FPTR_CAST_WARNINGS and XML_POP_WARNINGS macros were added very recently, so define them as nothing if they aren't defined upon including the libxml2 headers. diff --git a/python/types.c b/python/types.c --- a/python/types.c +++ b/python/types.c @@ -29,6 +29,13 @@ #ifdef _WIN32 +#ifndef XML_IGNORE_FPTR_CAST_WARNINGS +#define XML_IGNORE_FPTR_CAST_WARNINGS +#endif +#ifndef XML_POP_WARNINGS +#define XML_POP_WARNINGS +#endif + #include <windows.h> #include <crtdbg.h>