summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-12-29 21:29:00 +0100
committerFlorian Westphal <fw@strlen.de>2018-12-29 21:29:22 +0100
commit1e224c1399236cb5f93b53b4cebe7944237ad204 (patch)
treeaca5f70c44a1517315416b69f681bc59199cf8cb /src
parentfd09b75624c36a8b29fdb224287994edcaf441bc (diff)
xt: fix build with --with-xtables
The previous change is bonkers, it fixes build when libxtables isn't even installed, but broke build when --with-xtables is provided to configure. Reason is that the include guard comes too early, so xtables.h is never included, causing build to fail because no libxtables function prototypes and definitions are available. Fixes: 9e84f3f083bb ("xt: fix build when libxtables is not installed") Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src')
-rw-r--r--src/xt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xt.c b/src/xt.c
index 08560976..c80e1fc0 100644
--- a/src/xt.c
+++ b/src/xt.c
@@ -11,9 +11,6 @@
#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>
@@ -29,6 +26,10 @@
#include <linux/netfilter_arp/arp_tables.h>
#include <linux/netfilter_bridge/ebtables.h>
+#ifdef HAVE_LIBXTABLES
+#include <xtables.h>
+#endif
+
void xt_stmt_xlate(const struct stmt *stmt, struct output_ctx *octx)
{
#ifdef HAVE_LIBXTABLES