webkit2gtk: unbreak musl
This commit is contained in:
parent
76324cbd41
commit
fd3e098a2b
|
@ -0,0 +1,11 @@
|
|||
--- Source/WTF/wtf/DisallowCType.h
|
||||
+++ Source/WTF/wtf/DisallowCType.h
|
||||
@@ -40,7 +40,7 @@
|
||||
// are used from wx headers. On GTK+ for Mac many GTK+ files include <libintl.h>
|
||||
// or <glib/gi18n-lib.h>, which in turn include <xlocale/_ctype.h> which uses
|
||||
// isacii().
|
||||
-#if !(OS(DARWIN) && PLATFORM(GTK)) && !PLATFORM(EFL) && !defined(_LIBCPP_VERSION)
|
||||
+#if !(OS(DARWIN) && PLATFORM(GTK)) && !PLATFORM(EFL) && !defined(_LIBCPP_VERSION) && defined(__GLIBC__)
|
||||
|
||||
#include <ctype.h>
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
There is no execinfo.h in musl. Disable backtrace code if
|
||||
__GLIBC__ is not defined.
|
||||
|
||||
--- Source/WTF/wtf/Assertions.cpp
|
||||
+++ Source/WTF/wtf/Assertions.cpp
|
||||
@@ -71,8 +71,10 @@
|
||||
#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
|
||||
#include <cxxabi.h>
|
||||
#include <dlfcn.h>
|
||||
+#if defined(__GLIBC__)
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -225,7 +227,7 @@
|
||||
|
||||
void WTFGetBacktrace(void** stack, int* size)
|
||||
{
|
||||
-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
|
||||
+#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__))
|
||||
*size = backtrace(stack, *size);
|
||||
#elif OS(WINDOWS)
|
||||
// The CaptureStackBackTrace function is available in XP, but it is not defined
|
||||
index 657ced4..ceb9c47 100644
|
||||
--- Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp
|
||||
+++ Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp
|
||||
@@ -46,7 +46,9 @@
|
||||
|
||||
#include <cxxabi.h>
|
||||
#include <dlfcn.h>
|
||||
+#if defined(__GLIBC__)
|
||||
#include <execinfo.h>
|
||||
+#endif
|
||||
|
||||
#if ENABLE(REMOTE_INSPECTOR)
|
||||
#include "JSGlobalObjectDebuggable.h"
|
|
@ -0,0 +1,39 @@
|
|||
Explicitly use std::isnan() for musl libc
|
||||
|
||||
--- Source/WTF/wtf/Stopwatch.h
|
||||
+++ Source/WTF/wtf/Stopwatch.h
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
double elapsedTime();
|
||||
|
||||
- bool isActive() const { return !isnan(m_lastStartTime); }
|
||||
+ bool isActive() const { return !std::isnan(m_lastStartTime); }
|
||||
private:
|
||||
Stopwatch() { reset(); }
|
||||
|
||||
@@ -60,14 +60,14 @@
|
||||
|
||||
inline void Stopwatch::start()
|
||||
{
|
||||
- ASSERT_WITH_MESSAGE(isnan(m_lastStartTime), "Tried to start the stopwatch, but it is already running.");
|
||||
+ ASSERT_WITH_MESSAGE(std::isnan(m_lastStartTime), "Tried to start the stopwatch, but it is already running.");
|
||||
|
||||
m_lastStartTime = monotonicallyIncreasingTime();
|
||||
}
|
||||
|
||||
inline void Stopwatch::stop()
|
||||
{
|
||||
- ASSERT_WITH_MESSAGE(!isnan(m_lastStartTime), "Tried to stop the stopwatch, but it is not running.");
|
||||
+ ASSERT_WITH_MESSAGE(!std::isnan(m_lastStartTime), "Tried to stop the stopwatch, but it is not running.");
|
||||
|
||||
m_elapsedTime += monotonicallyIncreasingTime() - m_lastStartTime;
|
||||
m_lastStartTime = NAN;
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
inline double Stopwatch::elapsedTime()
|
||||
{
|
||||
- bool shouldSuspend = !isnan(m_lastStartTime);
|
||||
+ bool shouldSuspend = !std::isnan(m_lastStartTime);
|
||||
if (shouldSuspend)
|
||||
stop();
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
There is no malloc_trim() in musl libc
|
||||
|
||||
--- Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
|
||||
+++ Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
|
||||
@@ -206,8 +206,10 @@
|
||||
|
||||
void MemoryPressureHandler::platformReleaseMemory(bool)
|
||||
{
|
||||
+#if defined(__GLIBC__)
|
||||
ReliefLogger log("Run malloc_trim");
|
||||
malloc_trim(0);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void MemoryPressureHandler::ReliefLogger::platformLog()
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'webkit2gtk'
|
||||
pkgname=webkit2gtk
|
||||
version=2.8.3
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=cmake
|
||||
configure_args="-DPORT=GTK -DENABLE_GTKDOC=OFF -DCMAKE_LINKER=${XBPS_CROSS_TRIPLET}-gcc"
|
||||
short_desc="GTK+3 port of the WebKit2 browser engine"
|
||||
|
|
Loading…
Reference in New Issue