3 ms·
I just encountered this issue with Musl today, trying to make some software that uses backtrace() and backtrace_symbols() work with it. I wound up making the u
by SamReidHughes 5y ago
I just encountered this issue with Musl today, trying to make some software that uses backtrace() and backtrace_symbols() work with it.
I wound up making the use #if !defined(NO_BACKTRACE) in the code and passing CXXFLAGS=-DNO_BACKTRACE in the build script for Alpine Linux. (The symbol name is slightly genericized.)
In my case, whether or not Musl offered a macro, NO_BACKTRACE is a cleaner, more proper solution than adding to the #ifndef _WIN32 #elif defined(__MACH__) /* or __APPLE__? */ #elif defined(__glibc__) chain.