From faed393afb020497f0355a3678943e48e37598c4 Mon Sep 17 00:00:00 2001 From: Michele Bini Date: Wed, 12 Feb 2014 17:28:52 +0100 Subject: [PATCH] Include some compilation fixes for Debian Lenny distribution (circa 2008); these will probably break compilation on more recent systems --- src/libiptc/ipt_conntrack.h | 11 +++++------ src/libiptc/libiptc.c | 2 -- src/mark.h | 28 +++++++++++++++++++++++++++- src/ntkresolv.c | 2 -- 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/src/libiptc/ipt_conntrack.h b/src/libiptc/ipt_conntrack.h index cccf761..32ea342 100644 --- a/src/libiptc/ipt_conntrack.h +++ b/src/libiptc/ipt_conntrack.h @@ -5,12 +5,7 @@ #ifndef _IPT_CONNTRACK_H #define _IPT_CONNTRACK_H -#if 0 -#include -#else -#include -#include -#endif +#include /* backwards compatibility crap. only exists in userspace - HW */ #include @@ -27,6 +22,10 @@ #define IP_CT_DIR_MAX 2 #endif +#ifndef IP_CT_DIR_MAX +#define IP_CT_DIR_MAX 2 +#endif + #define IPT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1)) #define IPT_CONNTRACK_STATE_INVALID (1 << 0) diff --git a/src/libiptc/libiptc.c b/src/libiptc/libiptc.c index 04dd7bc..ce9612b 100644 --- a/src/libiptc/libiptc.c +++ b/src/libiptc/libiptc.c @@ -59,14 +59,12 @@ static const char *hooknames[] #endif }; -#if 0 /* Convenience structures */ struct ipt_error_target { STRUCT_ENTRY_TARGET t; char error[TABLE_MAXNAMELEN]; }; -#endif struct chain_head; struct rule_head; diff --git a/src/mark.h b/src/mark.h index bb4ce22..46c3e02 100644 --- a/src/mark.h +++ b/src/mark.h @@ -1,11 +1,37 @@ #ifndef MARK_H #define MARK_H +/* Original inclusions from netsukuku 0.0.9b */ +#if 0 #include "libiptc/libiptc.h" -#include +#include +#include #include "libiptc/ipt_conntrack.h" #include "libiptc/ipt_connmark.h" #include "libiptc/ipt_CONNMARK.h" +#endif + +#if 1 +#include "libiptc/libiptc.h" +#if 1 +#include +#endif +#if 0 +#include +#endif +#include "libiptc/ipt_conntrack.h" +#include "libiptc/ipt_connmark.h" +#include "libiptc/ipt_CONNMARK.h" +#endif + +/* 2010 fixes for debian package */ +#if 0 +#include "libiptc/libiptc.h" +#include +#include +#include +#include +#endif #define MANGLE_TABLE "mangle" #define FILTER_TABLE "filter" diff --git a/src/ntkresolv.c b/src/ntkresolv.c index beb708f..f126915 100644 --- a/src/ntkresolv.c +++ b/src/ntkresolv.c @@ -1,5 +1,3 @@ -#include - #include "includes.h" #include "ntkresolv.h"