summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-07-04 16:51:57 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-07-04 16:51:57 +0200
commit1085a4e18d297d8338cf9babe7e623e25a00f499 (patch)
tree9431fe8c80b7f93013dc9f3b2a5428411e53d76a /src
parent556fb7ee694a0f18cbd3d73ac96b27c74081bd6d (diff)
src: xml: fix compilation without XML parsing enabled
Since (d844fa0 src: consolidate XML parsing of expressions via nft_mxml_expr_parse), the library was not compiling with XML support anymore. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/expr_ops.h4
-rw-r--r--src/mxml.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/expr_ops.h b/src/expr_ops.h
index 8dc4a09..18edfd1 100644
--- a/src/expr_ops.h
+++ b/src/expr_ops.h
@@ -9,6 +9,10 @@ struct nlattr;
struct nlmsghdr;
struct nft_rule_expr;
+#ifndef XML_PARSING
+#define mxml_node_t void
+#endif
+
struct expr_ops {
char *name;
size_t alloc_len;
diff --git a/src/mxml.c b/src/mxml.c
index 4d81bf4..9aef645 100644
--- a/src/mxml.c
+++ b/src/mxml.c
@@ -16,6 +16,7 @@
#include <libnftables/rule.h>
#include <libnftables/expr.h>
+#ifdef XML_PARSING
struct nft_rule_expr *nft_mxml_expr_parse(mxml_node_t *node)
{
mxml_node_t *tree;
@@ -75,3 +76,4 @@ int nft_mxml_reg_parse(mxml_node_t *tree, const char *reg_name, uint32_t flags)
err:
return -1;
}
+#endif