From 1e224c1399236cb5f93b53b4cebe7944237ad204 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Sat, 29 Dec 2018 21:29:00 +0100 Subject: 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 --- src/xt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/xt.c') 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 #include #include -#ifdef HAVE_LIBXTABLES -#include -#endif #include #include /* for isspace */ #include @@ -29,6 +26,10 @@ #include #include +#ifdef HAVE_LIBXTABLES +#include +#endif + void xt_stmt_xlate(const struct stmt *stmt, struct output_ctx *octx) { #ifdef HAVE_LIBXTABLES -- cgit v1.2.3