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:
Bart Ribbers 2018-06-09 22:35:51 +02:00 committed by Nicolas Fella
parent 95dd01b818
commit 0e90fe0bd0

View file

@ -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);