arptables: fix the redefinition of 'arpt_get_target' error
PATCH 1/1 arptables: fix the redefinition of 'arpt_get_target' error
From: "Roy.Li" <[email protected]>
Signed-off-by Roy.Li <[email protected]>
--- .../arptables-arpt-get-target-fix.patch | 30 ++++++++++++++++++++ .../recipes-support/arptables/arptables_0.0.3-4.bb | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-arpt-get-target-fix.patch
meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-arpt-get-target-fix.patch new file +30 -0
@@ -0,0 +1,30 @@ +arptables: fix the redefinition of 'arpt_get_target' + +Upstream-Status: Pending + +This function is already defined as a static inline function in +include/linux/netfilter_arp/arp_tables.h, once GCC uses -O0, the +inline will not work, and the redefinition error will happen + +Signed-off-by: Aws Ismail <[email protected]> +Signed-off-by: Roy.Li <[email protected]> + +diff --git a/libarptc/libarptc_incl.c b/libarptc/libarptc_incl.c +index 35736db..addd3f9 100644 +--- a/libarptc/libarptc_incl.c ++++ b/libarptc/libarptc_incl.c +@@ -11,14 +11,6 @@ + /* (C)1999 Paul ``Rusty'' Russell - Placed under the GNU GPL (See + COPYING for details). */ + +-#ifndef __OPTIMIZE__ +-STRUCT_ENTRY_TARGET * +-GET_TARGET(STRUCT_ENTRY *e) +-{ +- return (void *)e + e->target_offset; +-} +-#endif +- + static int sockfd = -1; + static void *arptc_fn = NULL; +
meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb +1 -0
@@ -12,6 +12,7 @@ SRC_URI = " \ ${SOURCEFORGE_MIRROR}/ebtables/arptables-v${PV}.tar.gz;name=arptables \ file://arptables-compile-install.patch \ file://arptables-init-busybox.patch \ + file://arptables-arpt-get-target-fix.patch \ " SRC_URI[arptables.md5sum] = "1d4ab05761f063b0751645d8f2b8f8e5" SRC_URI[arptables.sha256sum] = "e529fd465c67d69ad335299a043516e6b38cdcd337a5ed21718413e96073f928"
Signature · 1 line
1.7.10.4
Joe MacDonald
AppliedMerged, thanks.
-J.
Quoted 57 lines · [[PATCH meta-networking] arptables: fix the redefinition of 'arpt_get_target'…
From: "Roy.Li" <[email protected]>
Signed-off-by Roy.Li <[email protected]>--- .../arptables-arpt-get-target-fix.patch | 30 ++++++++++++++++++++ .../recipes-support/arptables/arptables_0.0.3-4.bb | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-arpt-get-target-fix.patchmeta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-arpt-get-target-fix.patch new file +30
-0@@ -0,0 +1,30 @@ +arptables: fix the redefinition of 'arpt_get_target' + +Upstream-Status: Pending + +This function is already defined as a static inline function in +include/linux/netfilter_arp/arp_tables.h, once GCC uses -O0, the +inline will not work, and the redefinition error will happen + +Signed-off-by: Aws Ismail <[email protected]> +Signed-off-by: Roy.Li <[email protected]> + +diff --git a/libarptc/libarptc_incl.c b/libarptc/libarptc_incl.c +index 35736db..addd3f9 100644 +--- a/libarptc/libarptc_incl.c ++++ b/libarptc/libarptc_incl.c +@@ -11,14 +11,6 @@ + /* (C)1999 Paul ``Rusty'' Russell - Placed under the GNU GPL (See + COPYING for details). */ + +-#ifndef __OPTIMIZE__ +-STRUCT_ENTRY_TARGET * +-GET_TARGET(STRUCT_ENTRY *e) +-{ +- return (void *)e + e->target_offset; +-} +-#endif +- + static int sockfd = -1; + static void *arptc_fn = NULL; +meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb +1
-0@@ -12,6 +12,7 @@ SRC_URI = " \ ${SOURCEFORGE_MIRROR}/ebtables/arptables-v${PV}.tar.gz;name=arptables \ file://arptables-compile-install.patch \ file://arptables-init-busybox.patch \ + file://arptables-arpt-get-target-fix.patch \ " SRC_URI[arptables.md5sum] = "1d4ab05761f063b0751645d8f2b8f8e5" SRC_URI[arptables.sha256sum] = "e529fd465c67d69ad335299a043516e6b38cdcd337a5ed21718413e96073f928"
Signature · 2 lines
-Joe MacDonald. :wq