From: Willy Tarreau Date: Wed, 2 Mar 2022 13:54:44 +0000 (+0100) Subject: BUILD: tcpcheck: do not declare tcp_check_keywords_register() inline X-Git-Tag: v2.6-dev3~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a631b8652366ec1950ba066e1e7370831516d228;p=thirdparty%2Fhaproxy.git BUILD: tcpcheck: do not declare tcp_check_keywords_register() inline This one is referenced in initcalls by its pointer, it makes no sense to declare it inline. At best it causes function duplication, at worst it doesn't build on older compilers. --- diff --git a/include/haproxy/tcpcheck.h b/include/haproxy/tcpcheck.h index 0d92983c42..3abd1ef074 100644 --- a/include/haproxy/tcpcheck.h +++ b/include/haproxy/tcpcheck.h @@ -102,6 +102,7 @@ int proxy_parse_spop_check_opt(char **args, int cur_arg, struct proxy *curpx, co int proxy_parse_httpchk_opt(char **args, int cur_arg, struct proxy *curpx, const struct proxy *defpx, const char *file, int line); +void tcp_check_keywords_register(struct action_kw_list *kw_list); /* Return the struct action_kw associated to a keyword */ static inline struct action_kw *action_kw_tcp_check_lookup(const char *kw) @@ -114,11 +115,6 @@ static inline void action_kw_tcp_check_build_list(struct buffer *chk) action_build_list(&tcp_check_keywords.list, chk); } -static inline void tcp_check_keywords_register(struct action_kw_list *kw_list) -{ - LIST_APPEND(&tcp_check_keywords.list, &kw_list->list); -} - #endif /* _HAPROXY_TCPCHECK_H */ /* diff --git a/src/tcpcheck.c b/src/tcpcheck.c index ff1c32b5a9..ba9321eb18 100644 --- a/src/tcpcheck.c +++ b/src/tcpcheck.c @@ -2316,6 +2316,10 @@ int tcpcheck_main(struct check *check) return retcode; } +void tcp_check_keywords_register(struct action_kw_list *kw_list) +{ + LIST_APPEND(&tcp_check_keywords.list, &kw_list->list); +} /**************************************************************************/ /******************* Internals to parse tcp-check rules *******************/