]> git.ipfire.org Git - thirdparty/libnftnl.git/commitdiff
src: xml: fix compilation without XML parsing enabled
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 4 Jul 2013 14:51:57 +0000 (16:51 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 4 Jul 2013 14:51:57 +0000 (16:51 +0200)
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>
src/expr_ops.h
src/mxml.c

index 8dc4a09940f4788e9f1e4b048fad855bec329bc1..18edfd142ed8b2ab5e6df2cf327c5aaa38cb1bb6 100644 (file)
@@ -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;
index 4d81bf407129c82469d12a72609b66534342f1d5..9aef645bf63c4457da3a777ef6cf0b58fb8c5bc8 100644 (file)
@@ -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