BUILD: bug: Fix error when compiling with -DDEBUG_STRICT_NOCRASH
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 3 Dec 2021 07:58:22 +0000 (08:58 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 3 Dec 2021 08:07:35 +0000 (09:07 +0100)
commit9562b42de844f31225132ac97d1b7c5cee96a5d9
tree4f6fe213607fc442ddd16543e04dea5ed0a5429c
parentd590958a5af00796391d39c54e85eeb47509102d
BUILD: bug: Fix error when compiling with -DDEBUG_STRICT_NOCRASH

ha_backtrace_to_stderr() must be declared in CRASH_NOW() macro whe HAProxy
is compiled with DEBUG_STRICT_NOCRASH. Otherwise an error is reported during
compilation:

include/haproxy/bug.h:58:26: error: implicit declaration of function ‘ha_backtrace_to_stderr’ [-Werror=implicit-function-declaration]
   58 | #define CRASH_NOW() do { ha_backtrace_to_stderr(); } while (0)

This patch must be backported as far as 2.4.

(cherry picked from commit d6ae912b04a38a544b2d37f549c7f86ae51e929c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
include/haproxy/bug.h