mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-31 10:32:30 +00:00
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.
This commit is contained in:
parent
d0328191ef
commit
b17119f2c6
@ -1,6 +1,6 @@
|
||||
#include "base/backtrace.h"
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#ifdef __linux__
|
||||
|
||||
// LINUX ONLY
|
||||
|
||||
|
@ -205,7 +205,7 @@
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#if !(defined(__APPLE__) || defined(MACOSX) || defined(macintosh) || defined(Macintosh))
|
||||
#ifdef _MSC_VER
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#else
|
||||
|
@ -17,6 +17,10 @@
|
||||
#include "base/basictypes.h"
|
||||
#include "file/file_util.h"
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define stat64 stat
|
||||
#endif
|
||||
|
||||
bool writeStringToFile(bool text_file, const std::string &str, const char *filename)
|
||||
{
|
||||
FILE *f = fopen(filename, text_file ? "w" : "wb");
|
||||
|
@ -4,11 +4,15 @@
|
||||
#include "base/basictypes.h"
|
||||
#include "base/buffer.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#ifdef __FreeBSD__
|
||||
#include <netinet/in.h>
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
namespace net {
|
||||
|
Loading…
x
Reference in New Issue
Block a user