mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
tools: hscollider FTBS in alpine linux
alpine uses musl instead of glibc and therefore doesn't have backtrace() as part of its libc. POSIX mandates that _exit() be defined through unistd.h which used to be included together with execinfo.h when backtrace() was detected and therefore it happened to build fine for linux or freebsd (when using libexecinfo from the system or ports). since there was a macro already defined to test for unistd.h use that instead and decouple this dependency, so that the code could be built even when no backtrace() is provided (as expected also in OpenBSD)
This commit is contained in:
parent
f28feee57d
commit
7ea4e06275
@ -42,7 +42,10 @@
|
|||||||
|
|
||||||
#ifdef HAVE_BACKTRACE
|
#ifdef HAVE_BACKTRACE
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
#include <unistd.h>
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
#include <unistd.h> // for _exit
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BACKTRACE_BUFFER_SIZE 200
|
#define BACKTRACE_BUFFER_SIZE 200
|
||||||
|
Loading…
x
Reference in New Issue
Block a user