mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 09:07: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
|
#define _HAPROXY_TOOLS_H
|
||||||
|
|
||||||
#ifdef USE_BACKTRACE
|
#ifdef USE_BACKTRACE
|
||||||
|
// for backtrace() on Linux
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#include <execinfo.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -47,6 +47,10 @@
|
|||||||
#include <haproxy/protocol-t.h>
|
#include <haproxy/protocol-t.h>
|
||||||
#include <haproxy/tools-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 ******/
|
/****** string-specific macros and functions ******/
|
||||||
/* if a > max, then bound <a> to <max>. The macro returns the new <a> */
|
/* 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); })
|
#define UBOUND(a, max) ({ typeof(a) b = (max); if ((a) > b) (a) = b; (a); })
|
||||||
|
Loading…
Reference in New Issue
Block a user