mirror of
https://github.com/QuasarApp/backward-cpp.git
synced 2025-04-30 04:14:30 +00:00
Linux is not synonymous with glibc. Alpine linux (among others) uses libmusl as the standard C library. Alpine/libmusl doesn't have backtrace, dladdr1, execinfo.h or error.h. It does have libunwind and program_invocation_name and libdwarf and libelf are available as packages. This patch makes backward-cpp work on Alpine linux (and hopefully others that rely on libmusl). This patch makes dladdr1 dependent on the __GLIBC__ pp-symbol (rather than __ANDROID__). It uses __has_include (protected by a defined()) rather than __APPLE__ to decide whether to include <error.h> in _test_main.cpp.