diff options
author | Florian Westphal <fw@strlen.de> | 2018-11-29 14:57:59 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-12-04 01:39:36 +0100 |
commit | 9e84f3f083bb33f4de974fd87a5d06fb9609be12 (patch) | |
tree | 52c7b6d8a19144ee4aa603ab47cfa597ca51dcd6 /src/xt.c | |
parent | 1018eae77176cffd39bad0e499010923642c2cba (diff) |
xt: fix build when libxtables is not installed
If libxtables is not even installed, build fails due to to missing
include file.
ifdef LIBXTABLES guard fixes the first error, but results in two
followup failures:
1. missing IFNAMSIZ definition
2. dereference of unknown struct.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/xt.c')
-rw-r--r-- | src/xt.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -10,7 +10,10 @@ #include <stdlib.h> #include <time.h> #include <string.h> +#include <net/if.h> +#ifdef HAVE_LIBXTABLES #include <xtables.h> +#endif #include <getopt.h> #include <ctype.h> /* for isspace */ #include <statement.h> @@ -76,6 +79,7 @@ void xt_stmt_xlate(const struct stmt *stmt, struct output_ctx *octx) void xt_stmt_release(const struct stmt *stmt) { +#ifdef HAVE_LIBXTABLES switch (stmt->xt.type) { case NFT_XT_MATCH: if (!stmt->xt.match) @@ -95,6 +99,7 @@ void xt_stmt_release(const struct stmt *stmt) default: break; } +#endif xfree(stmt->xt.entry); } |