7d884adc743b19dd1ae16356970d3fac8c0cd517
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / qt5 / qt5base / 0002-logging-Check-if-uClibc-has-backtrace-support.patch
1 From 9f03adc74fa06e9559e8bb85f1cfd942397328b5 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= <fatih.asici@gmail.com>
3 Date: Wed, 24 Dec 2014 17:29:11 +0200
4 Subject: [PATCH] logging: Check if uClibc has backtrace support
5
6 execinfo.h is optional in uClibc. We need to check
7 __UCLIBC_HAS_BACKTRACE__ if uClibc is used.
8
9 Change-Id: Ie28be85b0b70472df1fc4a208581bb66ad34229e
10 Sent-Upstream: https://codereview.qt-project.org/#/c/102628/
11 Signed-off-by: Fatih Aşıcı <fatih.asici@gmail.com>
12 ---
13  src/corelib/global/qlogging.cpp | 15 +++++++++++----
14  1 file changed, 11 insertions(+), 4 deletions(-)
15
16 diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
17 index 50d35a6..fa897d6 100644
18 --- a/src/corelib/global/qlogging.cpp
19 +++ b/src/corelib/global/qlogging.cpp
20 @@ -77,14 +77,21 @@
21  #endif
22  
23  #if !defined QT_NO_REGULAREXPRESSION && !defined(QT_BOOTSTRAPPED)
24 -#  if (defined(__GLIBC__) && defined(__GLIBCXX__)) || (__has_include(<cxxabi.h>) && __has_include(<execinfo.h>))
25 +#  ifdef __UCLIBC__
26 +#    if __UCLIBC_HAS_BACKTRACE__
27 +#      define QLOGGING_HAVE_BACKTRACE
28 +#    endif
29 +#  elif (defined(__GLIBC__) && defined(__GLIBCXX__)) || (__has_include(<cxxabi.h>) && __has_include(<execinfo.h>))
30  #    define QLOGGING_HAVE_BACKTRACE
31 -#    include <qregularexpression.h>
32 -#    include <cxxabi.h>
33 -#    include <execinfo.h>
34  #  endif
35  #endif
36  
37 +#ifdef QLOGGING_HAVE_BACKTRACE
38 +#  include <qregularexpression.h>
39 +#  include <cxxabi.h>
40 +#  include <execinfo.h>
41 +#endif
42 +
43  #include <stdio.h>
44  
45  QT_BEGIN_NAMESPACE
46 -- 
47 1.9.1
48