$OpenBSD: patch-ext_libclementine-common_core_logging_cpp,v 1.5 2020/01/26 17:37:07 rsadowski Exp $
Use shiny CMake FindBacktrace module.
Index: ext/libclementine-common/core/logging.cpp
--- ext/libclementine-common/core/logging.cpp.orig
+++ ext/libclementine-common/core/logging.cpp
@@ -18,12 +18,11 @@
 // it is used by the Spotify blob which links against libspotify and is not GPL
 // compatible.
 
+#include <config.h>
+
 #include <QtGlobal>
 
 #include <cxxabi.h>
-#ifdef Q_OS_UNIX
-#include <execinfo.h>
-#endif
 
 #include <iostream>
 
@@ -254,7 +253,7 @@ QString DemangleSymbol(const QString& symbol) {
 }
 
 void DumpStackTrace() {
-#ifdef Q_OS_UNIX
+#if Backtrace_FOUND
   void* callstack[128];
   int callstack_size =
       backtrace(reinterpret_cast<void**>(&callstack), sizeof(callstack));
@@ -267,7 +266,7 @@ void DumpStackTrace() {
   }
   free(symbols);
 #else
-  qLog(Debug) << "FIXME: Implement printing stack traces on this platform";
+  qLog(Debug) << "FIXME: Implement printing stack traces on this platform, or port backtrace library";
 #endif
 }
 
