[libxml2] Fix testapi when building --without-sax1



commit e519c6e1c6c0cd7918b2d33bf9bb7f8edc752910
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon Aug 22 15:16:00 2022 +0200

    Fix testapi when building --without-sax1
    
    Broken in commit c61e1273.

 testapi.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/testapi.c b/testapi.c
index db968cd9..769fda6e 100644
--- a/testapi.c
+++ b/testapi.c
@@ -464,10 +464,14 @@ static void des_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlParserCtxtPtr val,
         xmlFreeParserCtxt(val);
 }
 
-#ifdef LIBXML_SAX1_ENABLED
+#if defined(LIBXML_PUSH_ENABLED) || defined(LIBXML_SAX1_ENABLED) || \
+    defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_VALID_ENABLED)
 #define gen_nb_xmlSAXHandlerPtr 2
 static xmlSAXHandlerPtr gen_xmlSAXHandlerPtr(int no, int nr ATTRIBUTE_UNUSED) {
+    (void) no;
+#ifdef LIBXML_SAX1_ENABLED
     if (no == 0) return((xmlSAXHandlerPtr) &xmlDefaultSAXHandler);
+#endif
     return(NULL);
 }
 static void des_xmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, xmlSAXHandlerPtr val ATTRIBUTE_UNUSED, int nr 
ATTRIBUTE_UNUSED) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]