void-packages/srcpkgs/qt5/patches/fix-execinfo.patch

146 lines
5.0 KiB
Diff

--- qtwebkit/Source/WTF/wtf/Assertions.cpp
+++ qtwebkit/Source/WTF/wtf/Assertions.cpp
@@ -64,7 +64,7 @@
#include <windows.h>
#endif
-#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID)
+#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__)) && !OS(ANDROID)
#include <cxxabi.h>
#include <dlfcn.h>
#include <execinfo.h>
@@ -242,7 +242,7 @@
void WTFGetBacktrace(void** stack, int* size)
{
-#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID)
+#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__)) && !OS(ANDROID)
*size = backtrace(stack, *size);
#elif OS(WINDOWS) && !OS(WINCE)
// The CaptureStackBackTrace function is available in XP, but it is not defined
--- qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc.orig 2015-05-11 17:47:05.730337744 +0200
+++ qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2015-05-11 17:50:09.730450061 +0200
@@ -22,7 +22,7 @@
#if defined(__GLIBCXX__)
#include <cxxabi.h>
#endif
-#if !defined(__UCLIBC__)
+#if defined(__GLIBC__)
#include <execinfo.h>
#endif
@@ -73,7 +73,7 @@ void DemangleSymbols(std::string* text)
// Note: code in this function is NOT async-signal safe (std::string uses
// malloc internally).
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
std::string::size_type search_from = 0;
while (search_from < text->size()) {
@@ -110,7 +110,7 @@ void DemangleSymbols(std::string* text)
}
}
-#endif // defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#endif // defined(__GLIBCXX__) && defined(__GLIBC__)
}
#endif // !defined(USE_SYMBOLIZE)
@@ -169,7 +169,7 @@ void ProcessBacktrace(void *const *trace
handler->HandleOutput("\n");
}
-#elif !defined(__UCLIBC__)
+#elif defined(__GLIBC__)
bool printed = false;
// Below part is async-signal unsafe (uses malloc), so execute it only
@@ -281,7 +281,7 @@ void StackDumpSignalHandler(int signal,
}
PrintToStderr("\n");
-#if !defined(__UCLIBC__)
+#if defined(__GLIBC__)
debug::StackTrace().Print();
#endif
@@ -742,7 +742,7 @@ StackTrace::StackTrace() {
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
-#if !defined(__UCLIBC__)
+#if defined(__GLIBC__)
// Though the backtrace API man page does not list any possible negative
// return values, we take no chance.
count_ = base::saturated_cast<size_t>(backtrace(trace_, arraysize(trace_)));
@@ -751,7 +751,7 @@ StackTrace::StackTrace() {
#endif
}
-#if !defined(__UCLIBC__)
+#if defined(__GLIBC__)
void StackTrace::Print() const {
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
--- qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/wtf/Assertions.cpp.orig 2015-05-11 17:52:11.308845782 +0200
+++ qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/wtf/Assertions.cpp 2015-05-11 17:52:54.731344269 +0200
@@ -65,7 +65,7 @@
#define HAVE_ISDEBUGGERPRESENT 1
#endif
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
#include <cxxabi.h>
#include <dlfcn.h>
#include <execinfo.h>
@@ -228,7 +228,7 @@ void WTFReportArgumentAssertionFailure(c
void WTFGetBacktrace(void** stack, int* size)
{
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
*size = backtrace(stack, *size);
#elif OS(WIN)
// The CaptureStackBackTrace function is available in XP, but it is not defined
@@ -266,7 +266,7 @@ FrameToNameScope::FrameToNameScope(void*
: m_name(0)
, m_cxaDemangled(0)
{
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
Dl_info info;
if (!dladdr(addr, &info) || !info.dli_sname)
return;
--- qtwebengine/src/3rdparty/chromium/third_party/icu/source/common/unicode/plinux.h.orig 2015-05-11 21:54:12.721430155 +0200
+++ qtwebengine/src/3rdparty/chromium/third_party/icu/source/common/unicode/plinux.h 2015-05-11 21:54:21.105450434 +0200
@@ -282,7 +282,7 @@
#if 1
#define U_TZSET tzset
#endif
-#if !defined(__UCLIBC__)
+#if defined(__GLIBC__)
#define U_TIMEZONE __timezone
#endif
#if 1
--- qtwebengine/src/3rdparty/chromium/third_party/libxml/src/threads.c.orig 2015-05-12 06:49:49.220140993 +0200
+++ qtwebengine/src/3rdparty/chromium/third_party/libxml/src/threads.c 2015-05-12 06:52:15.196605626 +0200
@@ -48,7 +48,7 @@
static int libxml_is_threaded = -1;
#ifdef __GNUC__
-#ifdef linux
+#ifdef __GLIBC__
#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
extern int pthread_once (pthread_once_t *__once_control,
void (*__init_routine) (void))
@@ -88,7 +88,7 @@ extern int pthread_key_delete ()
extern int pthread_cond_signal ()
__attribute((weak));
#endif
-#endif /* linux */
+#endif /* __GLIBC__ */
#endif /* __GNUC__ */
#endif /* HAVE_PTHREAD_H */