From e1e6e94c5de064b5573f9bc9efbe0b9b679d9c0f Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 4 Sep 2017 09:56:34 -0500 Subject: [PATCH] webkitgtk: Add musl patch from Alpine re:execinfo, use libc++ on ALLVM --- pkgs/development/libraries/webkitgtk/2.4.nix | 2 ++ .../libraries/webkitgtk/fix-execinfo.patch | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/development/libraries/webkitgtk/fix-execinfo.patch diff --git a/pkgs/development/libraries/webkitgtk/2.4.nix b/pkgs/development/libraries/webkitgtk/2.4.nix index 6669b562400..18d20bf9c78 100644 --- a/pkgs/development/libraries/webkitgtk/2.4.nix +++ b/pkgs/development/libraries/webkitgtk/2.4.nix @@ -53,6 +53,8 @@ stdenv.mkDerivation rec { ./quartz-webcore.patch ./libc++.patch ./plugin-none.patch + ] ++ optionals stdenv.hostPlatform.isMusl [ + ./fix-execinfo.patch ]; configureFlags = with stdenv.lib; [ diff --git a/pkgs/development/libraries/webkitgtk/fix-execinfo.patch b/pkgs/development/libraries/webkitgtk/fix-execinfo.patch new file mode 100644 index 00000000000..eb825312f3b --- /dev/null +++ b/pkgs/development/libraries/webkitgtk/fix-execinfo.patch @@ -0,0 +1,20 @@ +--- webkitgtk-2.2.0.orig/Source/WTF/wtf/Assertions.cpp ++++ webkitgtk-2.2.0/Source/WTF/wtf/Assertions.cpp +@@ -64,7 +64,7 @@ + #include + #endif + +-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__)) ++#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__)) + #include + #include + #include +@@ -242,7 +242,7 @@ + + void WTFGetBacktrace(void** stack, int* size) + { +-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__)) ++#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__)) + *size = backtrace(stack, *size); + #elif OS(WINDOWS) && !OS(WINCE) + // The CaptureStackBackTrace function is available in XP, but it is not defined