aboutsummaryrefslogtreecommitdiffstats
path: root/testing/easyloggingpp-dev/musl-compat.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/easyloggingpp-dev/musl-compat.patch')
-rw-r--r--testing/easyloggingpp-dev/musl-compat.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/testing/easyloggingpp-dev/musl-compat.patch b/testing/easyloggingpp-dev/musl-compat.patch
new file mode 100644
index 0000000000..ca5efebc87
--- /dev/null
+++ b/testing/easyloggingpp-dev/musl-compat.patch
@@ -0,0 +1,38 @@
+From b691bec24cf7a3d35748e47da78e3f98d6b9817d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= <aklitzing@gmail.com>
+Date: Wed, 21 Jun 2017 20:21:01 +0200
+Subject: [PATCH] Add __has_include check for execinfo.h
+
+This header is necessary later for the stacktrace feature.
+This fixes musl based distributions.
+
+--- a/src/easylogging++.h
++++ b/src/easylogging++.h
+@@ -205,7 +205,7 @@
+ # define ELPP_INTERNAL_INFO(lvl, msg)
+ #endif // (defined(ELPP_DEBUG_INFO))
+ #if (defined(ELPP_FEATURE_ALL)) || (defined(ELPP_FEATURE_CRASH_LOG))
+-# if (ELPP_COMPILER_GCC && !ELPP_MINGW && !ELPP_OS_ANDROID && !ELPP_OS_EMSCRIPTEN)
++# if (__has_include(<execinfo.h>) && ELPP_COMPILER_GCC && !ELPP_MINGW && !ELPP_OS_ANDROID && !ELPP_OS_EMSCRIPTEN)
+ # define ELPP_STACKTRACE 1
+ # else
+ # if ELPP_COMPILER_MSVC
+--- a/cmake/easyloggingpp.pc.cmakein.orig
++++ b/cmake/easyloggingpp.pc.cmakein
+@@ -3,4 +3,6 @@
+ Version: @ELPP_VERSION_STRING@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ includedir=@ELPP_INCLUDE_INSTALL_DIR@
++libdir=@CMAKE_INSTALL_PREFIX@/lib
++Libs: -L${libdir} -lexecinfo
+ Cflags: -I${includedir}
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -91,6 +92,7 @@
+ ELPP_FRESH_LOG_FILE
+ )
+
++ target_link_libraries(easyloggingpp-unit-tests execinfo)
+ # Standard linking to gtest stuff.
+ target_link_libraries(easyloggingpp-unit-tests gtest gtest_main)
+