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
This commit is contained in:
parent
95dd01b818
commit
0e90fe0bd0
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
Q_LOGGING_CATEGORY(KDECONNECT_CORE, "kdeconnect.core")
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
#if defined(__GNU_LIBRARY__)
|
||||
#include <execinfo.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue