summaryrefslogtreecommitdiffstats
path: root/extensions/ebt_inat.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@inai.de>2018-06-27 11:50:41 +0200
committerFlorian Westphal <fw@strlen.de>2018-07-02 18:07:13 +0200
commitdf0620e7ccb2026a3e18634632f4be5314075906 (patch)
treeaa55ba4bf626cc35d43b3d9a15423c240030e263 /extensions/ebt_inat.c
parent4f3c04785c807623c483b184e534b935c7580153 (diff)
extensions: use __attribute__((constructor)) for autoregistration
The ebtables initialization is easier, and, judging from the "static" recipe in Makefile, that calling ebt_*_register ahead of main is safe. This means that a static build won't need the pseudomain hack, and that -nostartfiles can also go away. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'extensions/ebt_inat.c')
-rw-r--r--extensions/ebt_inat.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/extensions/ebt_inat.c b/extensions/ebt_inat.c
index 681975d..48f65b4 100644
--- a/extensions/ebt_inat.c
+++ b/extensions/ebt_inat.c
@@ -379,8 +379,7 @@ static struct ebt_u_target idnat_target =
.extra_ops = opts_d,
};
-static void _init(void) __attribute__ ((constructor));
-static void _init(void)
+static void _INIT(void)
{
register_target(&isnat_target);
register_target(&idnat_target);