Fix compilation issue while xml is disabled

This commit is contained in:
Felipe Zimmerle
2018-02-21 16:15:05 -03:00
parent ff782ddfa4
commit ac100785d1
9 changed files with 54 additions and 6 deletions

View File

@@ -21,11 +21,13 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#ifdef WITH_LIBXML2
#include <libxml/xmlschemas.h>
#include <libxml/xpath.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/xpathInternals.h>
#endif
#include <iostream>
#include <string>
@@ -44,6 +46,12 @@
namespace modsecurity {
namespace Variables {
#ifndef WITH_LIBXML2
void XML::evaluate(Transaction *t,
Rule *rule,
std::vector<const VariableValue *> *l) { }
#else
void XML::evaluate(Transaction *t,
Rule *rule,
std::vector<const VariableValue *> *l) {
@@ -138,6 +146,7 @@ void XML::evaluate(Transaction *t,
xmlXPathFreeContext(xpathCtx);
}
#endif
} // namespace Variables
} // namespace modsecurity