blob: d7e4ef62630eadf10c4870fa6654ddbcdfccac5d [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From 0b68ad206d2d90df78d91cad4da19152084014cf Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 16 Sep 2015 05:15:04 +0000
4Subject: [PATCH] Enable backtrace on linux when using glibc
5
6We dont have backtrace() implemented on non-glibc libc's on linux
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10Upstream-Status: Accepted
11
12 Source/WTF/wtf/Assertions.cpp | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp
16index 191d53f..a4d86b5 100644
17--- a/Source/WTF/wtf/Assertions.cpp
18+++ b/Source/WTF/wtf/Assertions.cpp
19@@ -68,7 +68,7 @@
20 #include <unistd.h>
21 #endif
22
23-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
24+#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
25 #include <cxxabi.h>
26 #include <dlfcn.h>
27 #include <execinfo.h>
28@@ -225,7 +225,7 @@ void WTFReportArgumentAssertionFailure(const char* file, int line, const char* f
29
30 void WTFGetBacktrace(void** stack, int* size)
31 {
32-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
33+#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
34 *size = backtrace(stack, *size);
35 #elif OS(WINDOWS)
36 // The CaptureStackBackTrace function is available in XP, but it is not defined
37--
382.5.2
39