From ca1016eb155131ddb6c548a03c80cd6709515e2e Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Fri, 26 Jun 2020 10:54:58 +0100 Subject: [PATCH] backtrace: Do not attempt to compile if spice_backtrace is empty In backtrace.h spice_backtrace is defined as: #if defined(WIN32) && !defined(__MINGW32__) #define spice_backtrace() #else .. so don't try to compile if an empty macro is used. Currently not causing any issue as we use MingW on Windows but does not hurt is code is more portable. Signed-off-by: Frediano Ziglio Acked-by: Uri Lublin --- common/backtrace.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/backtrace.c b/common/backtrace.c index 2136191..74c05f8 100644 --- a/common/backtrace.c +++ b/common/backtrace.c @@ -23,6 +23,8 @@ #include +#if !defined(WIN32) || defined(__MINGW32__) + #include "backtrace.h" #include @@ -130,3 +132,4 @@ void spice_backtrace(void) spice_backtrace_backtrace(); } } +#endif