diff options
author | Phil Sutter <phil@nwl.cc> | 2022-03-15 12:25:21 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2022-03-15 14:53:52 +0100 |
commit | 6c689b639cf8e2aeced8685eca2915892d76ad86 (patch) | |
tree | fba72e5c79936c2640e7454c8818a24ec4f0fe56 /include | |
parent | 0c8e253595bd80e4ddd73230d079e33cd5420b32 (diff) |
Simplify static build extension loading
Instead of guarding all calls to init_extensions*(), define stubs if not
used.
While at it, also add the missing prototypes for arp- and ebtables
extension initializers.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'include')
-rw-r--r-- | include/xtables.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/xtables.h b/include/xtables.h index ca674c26..044f191f 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -595,8 +595,17 @@ static inline void xtables_print_mark_mask(unsigned int mark, extern void init_extensions(void); extern void init_extensions4(void); extern void init_extensions6(void); + extern void init_extensionsa(void); + extern void init_extensionsb(void); #else # define _init __attribute__((constructor)) _INIT +# define EMPTY_FUNC_DEF(x) static inline void x(void) {} + EMPTY_FUNC_DEF(init_extensions) + EMPTY_FUNC_DEF(init_extensions4) + EMPTY_FUNC_DEF(init_extensions6) + EMPTY_FUNC_DEF(init_extensionsa) + EMPTY_FUNC_DEF(init_extensionsb) +# undef EMPTY_FUNC_DEF #endif extern const struct xtables_pprot xtables_chain_protos[]; |