From 0e90fe0bd06e687b2028d269db560a2bde7e79c8 Mon Sep 17 00:00:00 2001 From: Bart Ribbers Date: Sat, 9 Jun 2018 22:35:51 +0200 Subject: [PATCH] Fix build failure on musl based systems Summary: Musl lacks backtrace support, so this patch fixes the build by making sure it only gets compiled when using a glibc system. Bug: 395161 Reviewers: #kde_connect Subscribers: kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D13446 --- core/core_debug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core_debug.cpp b/core/core_debug.cpp index 8d1fd92fb..4afe7d081 100644 --- a/core/core_debug.cpp +++ b/core/core_debug.cpp @@ -22,7 +22,7 @@ Q_LOGGING_CATEGORY(KDECONNECT_CORE, "kdeconnect.core") -#ifdef Q_OS_LINUX +#if defined(__GNU_LIBRARY__) #include #include #include @@ -30,7 +30,7 @@ Q_LOGGING_CATEGORY(KDECONNECT_CORE, "kdeconnect.core") void logBacktrace() { -#ifdef Q_OS_LINUX +#if defined(__GNU_LIBRARY__) void* array[32]; size_t size = backtrace (array, 32); char** strings = backtrace_symbols (array, size);