diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-08-05 12:21:41 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-08-05 12:21:41 +0200 |
commit | c6f08525001a9bfa8d3d529603d9c9a2316f1aaa (patch) | |
tree | 467a360b69f11b6281edefe35feb2d71bd7f394e | |
parent | 2ca39898ba4a7a7905693134457888769a4158ef (diff) | |
download | ptxdist-c6f08525001a9bfa8d3d529603d9c9a2316f1aaa.tar.gz ptxdist-c6f08525001a9bfa8d3d529603d9c9a2316f1aaa.tar.xz |
connman: add upstream patch to build with new iptables
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | patches/connman-0.76/0001-iptables-Work-around-API-breakage-introduced-in-ipta.patch | 77 | ||||
-rw-r--r-- | patches/connman-0.76/series | 1 |
2 files changed, 78 insertions, 0 deletions
diff --git a/patches/connman-0.76/0001-iptables-Work-around-API-breakage-introduced-in-ipta.patch b/patches/connman-0.76/0001-iptables-Work-around-API-breakage-introduced-in-ipta.patch new file mode 100644 index 000000000..04a1f8fdc --- /dev/null +++ b/patches/connman-0.76/0001-iptables-Work-around-API-breakage-introduced-in-ipta.patch @@ -0,0 +1,77 @@ +From: Stefan Schmidt <stefan@datenfreihafen.org> +Date: Wed, 20 Jul 2011 16:46:06 +0200 +Subject: [PATCH] iptables: Work around API breakage introduced in iptables + 1.4.11 + +The xtables_merge_options() paramter list got extended without version bump. +These clumsy #ifdef's make it possible to work with newer and older iptables +libraries. It got inspired from an iproute2 patch: +https://bugs.gentoo.org/attachment.cgi?id=276401 + +Once all distributions start to carry 1.4.11 it can be considered to bump the +minimum version for connman and remove these ifdef's. +--- + src/iptables.c | 12 ++++++++++-- + tools/iptables-test.c | 12 ++++++++++-- + 2 files changed, 20 insertions(+), 4 deletions(-) + +diff --git a/src/iptables.c b/src/iptables.c +index 8f8ab53..e852e01 100644 +--- a/src/iptables.c ++++ b/src/iptables.c +@@ -1089,7 +1089,11 @@ static int iptables_command(int argc, char *argv[]) + if (xt_t->init != NULL) + xt_t->init(xt_t->t); + iptables_globals.opts = +- xtables_merge_options(iptables_globals.opts, ++ xtables_merge_options( ++#if XTABLES_VERSION_CODE > 5 ++ iptables_globals.orig_opts, ++#endif ++ iptables_globals.opts, + xt_t->extra_opts, + &xt_t->option_offset); + if (iptables_globals.opts == NULL) +@@ -1113,7 +1117,11 @@ static int iptables_command(int argc, char *argv[]) + xt_m->init(xt_m->m); + if (xt_m != xt_m->next) { + iptables_globals.opts = +- xtables_merge_options(iptables_globals.opts, ++ xtables_merge_options( ++#if XTABLES_VERSION_CODE > 5 ++ iptables_globals.orig_opts, ++#endif ++ iptables_globals.opts, + xt_m->extra_opts, + &xt_m->option_offset); + if (iptables_globals.opts == NULL) +diff --git a/tools/iptables-test.c b/tools/iptables-test.c +index 298f23d..bfe4803 100644 +--- a/tools/iptables-test.c ++++ b/tools/iptables-test.c +@@ -1076,7 +1076,11 @@ int main(int argc, char *argv[]) + if (xt_t->init != NULL) + xt_t->init(xt_t->t); + connman_iptables_globals.opts = +- xtables_merge_options(connman_iptables_globals.opts, ++ xtables_merge_options( ++#if XTABLES_VERSION_CODE > 5 ++ connman_iptables_globals.orig_opts, ++#endif ++ connman_iptables_globals.opts, + xt_t->extra_opts, + &xt_t->option_offset); + if (connman_iptables_globals.opts == NULL) +@@ -1102,7 +1106,11 @@ int main(int argc, char *argv[]) + xt_m->init(xt_m->m); + if (xt_m != xt_m->next) { + connman_iptables_globals.opts = +- xtables_merge_options(connman_iptables_globals.opts, ++ xtables_merge_options( ++#if XTABLES_VERSION_CODE > 5 ++ connman_iptables_globals.orig_opts, ++#endif ++ connman_iptables_globals.opts, + xt_m->extra_opts, + &xt_m->option_offset); + if (connman_iptables_globals.opts == NULL) diff --git a/patches/connman-0.76/series b/patches/connman-0.76/series new file mode 100644 index 000000000..d1ab89874 --- /dev/null +++ b/patches/connman-0.76/series @@ -0,0 +1 @@ +0001-iptables-Work-around-API-breakage-introduced-in-ipta.patch |