Merge pull request #8 from Kovensky/header_fix

Fix FreeBSD compatibility and get rid of malloc.h
This commit is contained in:
Henrik Rydgård committed 2012-11-19 00:14:09 -08:00
commit 8e673a20f7
4 files changed
+13 -8

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
#include "base/backtrace.h"
#ifndef _MSC_VER
#ifdef __linux__
// LINUX ONLY
-3
View File
@@ -205,9 +205,6 @@
#include <string.h>
#include <assert.h>
#include <math.h>
#if !(defined(__APPLE__) || defined(MACOSX) || defined(macintosh) || defined(Macintosh))
#include <malloc.h>
#endif
#else
#define NULL 0
#endif
+4
View File
@@ -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");
+8 -4
View File
@@ -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 {