diff --git a/include/haproxy/tools.h b/include/haproxy/tools.h index 2be18e342..8d1afb5d7 100644 --- a/include/haproxy/tools.h +++ b/include/haproxy/tools.h @@ -23,8 +23,8 @@ #define _HAPROXY_TOOLS_H #ifdef USE_BACKTRACE +// for backtrace() on Linux #define _GNU_SOURCE -#include #endif #include @@ -47,6 +47,10 @@ #include #include +#if defined(USE_BACKTRACE) && defined(HA_HAVE_WORKING_BACKTRACE) +#include +#endif + /****** string-specific macros and functions ******/ /* if a > max, then bound to . The macro returns the new */ #define UBOUND(a, max) ({ typeof(a) b = (max); if ((a) > b) (a) = b; (a); })