Compiles now also in Windows

master
Stefan Jahn 2 years ago
parent 7c4f88b596
commit f508372fcd

@ -6,7 +6,11 @@
#include <string>
#include <time.h>
#include <fcntl.h>
#include <execinfo.h>
#ifdef BUILD_WINDOWS
# include <backtrace.h>
#else
# include <execinfo.h>
#endif
#include "debug.h"
#include "convert.h"
@ -148,6 +152,7 @@ void debug_drawraw(unsigned char *data, int pixfmt, int w, int h) {
#define BT_BUF_SIZE 100
void debug_backtrace () {
#ifndef BUILD_WINDOWS
unsigned int nptrs;
void *buffer[BT_BUF_SIZE];
char **strings;
@ -167,5 +172,6 @@ void debug_backtrace () {
for (size_t j = 0; j < nptrs; j++)
printf("%s\n", strings[j]);
free(strings);
#endif
};

Loading…
Cancel
Save