From: Florian Westphal Date: Sat, 29 Dec 2018 20:29:00 +0000 (+0100) Subject: xt: fix build with --with-xtables X-Git-Tag: v0.9.1~161 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e224c1399236cb5f93b53b4cebe7944237ad204;p=thirdparty%2Fnftables.git 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 --- 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