mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Fix compilation issue while xml is disabled
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user