From 51ba25e0fc89882e5021bed718de91d58f7f3907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Wed, 24 Dec 2014 17:29:11 +0200 Subject: logging: Check if uClibc has backtrace support execinfo.h is optional in uClibc. We need to check __UCLIBC_HAS_BACKTRACE__ if uClibc is used. Change-Id: Ie28be85b0b70472df1fc4a208581bb66ad34229e Reviewed-by: Kai Koehne Reviewed-by: Thiago Macieira --- src/corelib/global/qlogging.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 50d35a6d84..fa897d6d32 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -77,14 +77,21 @@ #endif #if !defined QT_NO_REGULAREXPRESSION && !defined(QT_BOOTSTRAPPED) -# if (defined(__GLIBC__) && defined(__GLIBCXX__)) || (__has_include() && __has_include()) +# ifdef __UCLIBC__ +# if __UCLIBC_HAS_BACKTRACE__ +# define QLOGGING_HAVE_BACKTRACE +# endif +# elif (defined(__GLIBC__) && defined(__GLIBCXX__)) || (__has_include() && __has_include()) # define QLOGGING_HAVE_BACKTRACE -# include -# include -# include # endif #endif +#ifdef QLOGGING_HAVE_BACKTRACE +# include +# include +# include +#endif + #include QT_BEGIN_NAMESPACE -- cgit v1.2.3