fullconenat: fix _init repeat definition

After iptables was updated to 1.8.8, a compilation error occurred during fullconenat compilation due to _init redefinition.
This commit is contained in:
zxlhhyccc 2022-07-17 23:05:57 +08:00 committed by Tianling Shen
parent e50fab1aca
commit 466e64ac90

View File

@ -0,0 +1,20 @@
--- a/libip6t_FULLCONENAT.c
+++ b/libip6t_FULLCONENAT.c
@@ -214,6 +214,7 @@ static struct xtables_target fullconenat_tg_reg = {
.x6_options = FULLCONENAT_opts,
};
+#define _init __attribute__((constructor)) _INIT
void _init(void)
{
xtables_register_target(&fullconenat_tg_reg);
--- a/libipt_FULLCONENAT.c
+++ b/libipt_FULLCONENAT.c
@@ -235,6 +235,7 @@ static struct xtables_target fullconenat_tg_reg = {
.x6_options = FULLCONENAT_opts,
};
+#define _init __attribute__((constructor)) _INIT
void _init(void)
{
xtables_register_target(&fullconenat_tg_reg);