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>
#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>
void xt_stmt_release(const struct stmt *stmt)
{
+#ifdef HAVE_LIBXTABLES
switch (stmt->xt.type) {
case NFT_XT_MATCH:
if (!stmt->xt.match)
default:
break;
}
+#endif
xfree(stmt->xt.entry);
}