Compiles now also in Windows

master
Stefan Jahn 2 years ago
parent 7c4f88b596
commit f508372fcd

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

Loading…
Cancel
Save