mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-04 20:06:51 +00:00
b17119f2c6
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.
18 lines
302 B
C++
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
|