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>
This commit is contained in:
Frediano Ziglio 2020-06-26 10:54:58 +01:00
parent 8e0e13881e
commit ca1016eb15

View File

@ -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