summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/core/slang-platform.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/core/slang-platform.cpp b/source/core/slang-platform.cpp
index 7f79d99e1..25e6bc6f0 100644
--- a/source/core/slang-platform.cpp
+++ b/source/core/slang-platform.cpp
@@ -15,9 +15,11 @@
#include <dlfcn.h>
#endif
+#if SLANG_HAS_BACKTRACE
+#include <execinfo.h>
+#endif
#if SLANG_LINUX_FAMILY
-#include <execinfo.h>
#include <unistd.h>
#endif
@@ -363,7 +365,7 @@ static const PlatformFlags s_familyFlags[int(PlatformFamily::CountOf)] = {
/* static */ void PlatformUtil::backtrace()
{
-#if SLANG_LINUX_FAMILY
+#if SLANG_HAS_BACKTRACE
// Print stack trace for debugging assistance
void* stackTrace[64];
int stackDepth = ::backtrace(stackTrace, 64);