mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
BUILD: tools: only include execinfo.h for the real backtrace() function
No need to include this possibly non-existing file when using our own backtrace() implementation, it's only needed for the libc-provided one. Because of this it's currently not possible to build musl with backtrace enabled.
This commit is contained in:
parent
1d403caf8a
commit
1c4776dbc3
@ -23,8 +23,8 @@
|
||||
#define _HAPROXY_TOOLS_H
|
||||
|
||||
#ifdef USE_BACKTRACE
|
||||
// for backtrace() on Linux
|
||||
#define _GNU_SOURCE
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
@ -47,6 +47,10 @@
|
||||
#include <haproxy/protocol-t.h>
|
||||
#include <haproxy/tools-t.h>
|
||||
|
||||
#if defined(USE_BACKTRACE) && defined(HA_HAVE_WORKING_BACKTRACE)
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
/****** string-specific macros and functions ******/
|
||||
/* if a > max, then bound <a> to <max>. The macro returns the new <a> */
|
||||
#define UBOUND(a, max) ({ typeof(a) b = (max); if ((a) > b) (a) = b; (a); })
|
||||
|
Loading…
Reference in New Issue
Block a user