From: Willy Tarreau Date: Fri, 30 May 2025 15:13:21 +0000 (+0200) Subject: BUILD: tools: properly define ha_dump_backtrace() to avoid a build warning X-Git-Tag: v3.0.12~128 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=bcdd08b328bc92c0aaaf5f5215ff98f9f728e514;p=haproxy-3.0.git BUILD: tools: properly define ha_dump_backtrace() to avoid a build warning In resolve_sym_name() we declare a few symbols that we want to be able to resolve. ha_dump_backtrace() was declared with a struct buffer instead of a pointer to such a struct, which has no effect since we only want to get the function's pointer, but produces a build warning with LTO, so let's fix it. This can be backported to 3.0. (cherry picked from commit b88164d9c0eb1540c9b787478162c254ac947e8d) Signed-off-by: Christopher Faulet (cherry picked from commit 6330c20026e79f54a6ead77d6c9573945a074744) Signed-off-by: Christopher Faulet (cherry picked from commit 30e59abd95cf22d755791fcd167c6e80d0b2d805) Signed-off-by: Christopher Faulet --- diff --git a/src/tools.c b/src/tools.c index 806f8e1..74be4ad 100644 --- a/src/tools.c +++ b/src/tools.c @@ -5432,7 +5432,7 @@ const void *resolve_sym_name(struct buffer *buf, const char *pfx, const void *ad DEF_SYM(poller_pipe_io_handler), DEF_SYM(mworker_accept_wrapper), DEF_SYM(session_expire_embryonic), - DEF_SYM(ha_dump_backtrace, extern void ha_dump_backtrace(struct buffer, const char *, int)), + DEF_SYM(ha_dump_backtrace, extern void ha_dump_backtrace(struct buffer *, const char *, int)), DEF_SYM(cli_io_handler, extern void cli_io_handler(struct appctx*)), #ifdef USE_THREAD DEF_SYM(accept_queue_process),