From 983e5fc41ef8ca7cfcf3ec01c3f6d1bb9284b8ae Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Mon, 21 Nov 2022 12:24:10 +0800 Subject: [PATCH] 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. --- python/types.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/types.c b/python/types.c index 651f17dd..53094250 100644 --- a/python/types.c +++ b/python/types.c @@ -29,6 +29,13 @@ xmlParserInputPtr xmlNoNetExternalEntityLoader(const char *URL, #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 #include