summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFatih Aşıcı <fatih.asici@gmail.com>2014-12-24 17:29:11 +0200
committerThiago Macieira <thiago.macieira@intel.com>2015-02-09 22:58:29 +0000
commit51ba25e0fc89882e5021bed718de91d58f7f3907 (patch)
tree62fcec82da754b9ebeb2b05989cdcf841eec48ae /src/corelib
parent3ab6653d97a5dd01fd5f5cb4e52d5816274e4cbd (diff)
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 <kai.koehne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qlogging.cpp15
1 files changed, 11 insertions, 4 deletions
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(<cxxabi.h>) && __has_include(<execinfo.h>))
+# ifdef __UCLIBC__
+# if __UCLIBC_HAS_BACKTRACE__
+# define QLOGGING_HAVE_BACKTRACE
+# endif
+# elif (defined(__GLIBC__) && defined(__GLIBCXX__)) || (__has_include(<cxxabi.h>) && __has_include(<execinfo.h>))
# define QLOGGING_HAVE_BACKTRACE
-# include <qregularexpression.h>
-# include <cxxabi.h>
-# include <execinfo.h>
# endif
#endif
+#ifdef QLOGGING_HAVE_BACKTRACE
+# include <qregularexpression.h>
+# include <cxxabi.h>
+# include <execinfo.h>
+#endif
+
#include <stdio.h>
QT_BEGIN_NAMESPACE