diff options
author | Frediano Ziglio <freddy77@gmail.com> | 2020-06-26 10:54:58 +0100 |
---|---|---|
committer | Frediano Ziglio <freddy77@gmail.com> | 2020-08-10 09:55:10 +0100 |
commit | ca1016eb155131ddb6c548a03c80cd6709515e2e (patch) | |
tree | 426c4f36a8b3533ac87e236d6aab676ceed70c7e | |
parent | 8e0e13881eb3cbc6210e7ebee430eab9fb941004 (diff) |
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 <freddy77@gmail.com>
Acked-by: Uri Lublin <uril@redhat.com>
-rw-r--r-- | common/backtrace.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 <config.h> +#if !defined(WIN32) || defined(__MINGW32__) + #include "backtrace.h" #include <errno.h> @@ -130,3 +132,4 @@ void spice_backtrace(void) spice_backtrace_backtrace(); } } +#endif |