ayaports/unmaintained/zeroc-ice35/0001-remove-backtrace-on-musl.patch
build@apk-groulx 7c2d413554 3.17 cleanup
2023-01-11 00:40:45 +00:00

24 lines
871 B
Diff

diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp
index e982e554fa..c0a83d4177 100644
--- a/cpp/src/IceUtil/Exception.cpp
+++ b/cpp/src/IceUtil/Exception.cpp
@@ -29,7 +29,7 @@
#include <cstdlib>
-#if defined(__GNUC__) && !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__)
+#if defined(__GNUC__) && !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__) && defined(__GNU_LIBRARY__)
# include <execinfo.h>
# include <cxxabi.h>
# define ICE_STACK_TRACES
@@ -252,8 +252,10 @@ getStackTrace()
const size_t maxDepth = 100;
void *stackAddrs[maxDepth];
+ #if defined(__GNU_LIBRARY__)
size_t stackDepth = backtrace(stackAddrs, maxDepth);
char **stackStrings = backtrace_symbols(stackAddrs, stackDepth);
+ #endif
//
// Start at 1 to skip the top frame (== call to this function)