ppsspp/base/backtrace.cpp
Kovensky b17119f2c6 Fixes for compatibility with FreeBSD
backtrace.cpp assumes that anything non-windows is linux.

stb_vorbis.c includes malloc.h which has been deprecated since the 90s
on all implementations other than MSVC.

The stat64 hack in file_util.cpp is only needed on linux.

http_client.h also assumes non-windows is linux.
2012-11-18 21:41:44 -03:00

18 lines
302 B
C++

#include "base/backtrace.h"
#ifdef __linux__
// LINUX ONLY
#include <execinfo.h>
#include <unistd.h>
static void *backtrace_buffer[128];
void PrintBacktraceToStderr() {
int num_addrs = backtrace(backtrace_buffer, 128);
backtrace_symbols_fd(backtrace_buffer, num_addrs, STDERR_FILENO);
}
#endif