From 305b4707d134362c9229241b922c3b2286d3c150 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 22 Mar 2015 20:59:42 +0100 Subject: src: restore static array with expression operations We cannot use __attribute__((constructor)) to register the supported expressions in runtime when the library is statically linked. This lead us to some explicit libnftnl_init() function that needs to be called from the main() function of the client program. This patch reverts 4dd0772 ("expr: use __attribute__((constructor)) to register expression"). Reported-by: Laurent Bercot Signed-off-by: Pablo Neira Ayuso --- src/expr/byteorder.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/expr/byteorder.c') diff --git a/src/expr/byteorder.c b/src/expr/byteorder.c index a16b145..81e5278 100644 --- a/src/expr/byteorder.c +++ b/src/expr/byteorder.c @@ -338,8 +338,3 @@ struct expr_ops expr_ops_byteorder = { .xml_parse = nft_rule_expr_byteorder_xml_parse, .json_parse = nft_rule_expr_byteorder_json_parse, }; - -static void __init expr_byteorder_init(void) -{ - nft_expr_ops_register(&expr_ops_byteorder); -} -- cgit v1.2.3