From df0620e7ccb2026a3e18634632f4be5314075906 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 27 Jun 2018 11:50:41 +0200 Subject: 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 --- extensions/ebt_nat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extensions/ebt_nat.c') diff --git a/extensions/ebt_nat.c b/extensions/ebt_nat.c index 00d9cd4..fe7e987 100644 --- a/extensions/ebt_nat.c +++ b/extensions/ebt_nat.c @@ -231,7 +231,7 @@ static struct ebt_u_target dnat_target = .extra_ops = opts_d, }; -void _init(void) +static void _INIT(void) { ebt_register_target(&snat_target); ebt_register_target(&dnat_target); -- cgit v1.2.3