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 --- include/ebtables_u.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/ebtables_u.h') diff --git a/include/ebtables_u.h b/include/ebtables_u.h index 3235bf5..7f5968d 100644 --- a/include/ebtables_u.h +++ b/include/ebtables_u.h @@ -44,6 +44,8 @@ #define EBT_ALIGN(s) (((s) + (EBT_MIN_ALIGN-1)) & ~(EBT_MIN_ALIGN-1)) #define ERRORMSG_MAXLEN 128 +#define _INIT __attribute__((constructor)) _init + struct ebt_u_entries { int policy; -- cgit v1.2.3