Fix inclusion of libunwind when not building for debug 35/26935/3
authorRafal Krypa <r.krypa@samsung.com>
Mon, 1 Sep 2014 16:49:40 +0000 (18:49 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Wed, 3 Sep 2014 13:46:59 +0000 (15:46 +0200)
Conditional inclusion of libunwind.h didn't properly depend on definition
of BUILD_TYPE_DEBUG. But only debug build checks for libunwind dependency.

Change-Id: I2158d09ae2880e9869246d75049aa1f23b8c4bcc
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
src/common/log/Backtrace.h

index df023ba..c96f29d 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef SRC_COMMON_LOG_BACKTRACE_H_
 #define SRC_COMMON_LOG_BACKTRACE_H_
 
-#ifndef CYNARA_NO_LOGS
+#if defined(BUILD_TYPE_DEBUG) && !defined(CYNARA_NO_LOGS)
 #define UNW_LOCAL_ONLY
 #include <libunwind.h>
 #endif
@@ -53,7 +53,7 @@ private:
     void operator=(Backtrace const &) = delete;
 
     const std::string buildBacktrace(void);
-#ifndef CYNARA_NO_LOGS
+#if defined(BUILD_TYPE_DEBUG) && !defined(CYNARA_NO_LOGS)
     void getSourceInfo(unw_word_t proc_address);
 #endif