mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 18:45:52 +00:00
Merge pull request #100 from alexdupre/freebsd
Fix most build errors on FreeBSD
This commit is contained in:
10
SConstruct
10
SConstruct
@@ -49,6 +49,8 @@ else:
|
||||
|
||||
# Use openssl
|
||||
env.ParseConfig('pkg-config --cflags --libs openssl')
|
||||
# Use protobuf
|
||||
env.ParseConfig('pkg-config --cflags --libs protobuf')
|
||||
|
||||
# The required version of boost is documented in the README file.
|
||||
#
|
||||
@@ -143,15 +145,9 @@ if not FreeBSD:
|
||||
]
|
||||
)
|
||||
|
||||
# Apparently, pkg-config --libs protobuf on bsd fails to provide this necessary include dir.
|
||||
if FreeBSD:
|
||||
env.Append(LINKFLAGS = ['-I/usr/local/include'])
|
||||
env.Append(CXXFLAGS = ['-DOS_FREEBSD'])
|
||||
|
||||
env.Append(
|
||||
LIBS = [
|
||||
'rt', # for clock_nanosleep in beast
|
||||
'protobuf',
|
||||
'z'
|
||||
]
|
||||
)
|
||||
@@ -183,7 +179,7 @@ TAG_SRCS = copy.copy(COMPILED_FILES)
|
||||
# Derive the object files from the source files.
|
||||
OBJECT_FILES = []
|
||||
|
||||
OBJECT_FILES += PROTO_SRCS
|
||||
OBJECT_FILES.append(PROTO_SRCS[0])
|
||||
|
||||
for file in COMPILED_FILES:
|
||||
OBJECT_FILES.append('build/obj/' + file)
|
||||
|
||||
@@ -280,11 +280,11 @@
|
||||
# include <tr1/functional>
|
||||
# endif
|
||||
|
||||
#elif BEAST_LINUX
|
||||
#elif BEAST_LINUX || BEAST_BSD
|
||||
# include <tr1/functional>
|
||||
|
||||
#else
|
||||
# error Unnkown platform!
|
||||
# error Unknown platform!
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ using std::tr1::placeholders::_1;
|
||||
using std::tr1::placeholders::_2;
|
||||
#endif
|
||||
|
||||
#elif BEAST_LINUX
|
||||
#elif BEAST_LINUX || BEAST_BSD
|
||||
using std::tr1::bind;
|
||||
using std::tr1::placeholders::_1;
|
||||
using std::tr1::placeholders::_2;
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
#ifndef BOOST_RNG_HPP
|
||||
#define BOOST_RNG_HPP
|
||||
|
||||
#define __STDC_LIMIT_MACROS 1
|
||||
#ifndef __STDC_LIMIT_MACROS
|
||||
#define __STDC_LIMIT_MACROS
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
|
||||
#include <boost/random.hpp>
|
||||
|
||||
@@ -15,16 +15,18 @@
|
||||
#if BEAST_WIN32
|
||||
#define LEVELDB_PLATFORM_WINDOWS
|
||||
|
||||
#elif BEAST_MAC || BEAST_IOS
|
||||
#define OS_MACOSX
|
||||
|
||||
// VFALCO TODO Distinguish between BEAST_BSD and BEAST_FREEBSD
|
||||
#elif BEAST_BSD
|
||||
#define OS_FREEBSD
|
||||
|
||||
#else
|
||||
#define LEVELDB_PLATFORM_POSIX
|
||||
|
||||
#if BEAST_MAC || BEAST_IOS
|
||||
#define OS_MACOSX
|
||||
|
||||
// VFALCO TODO Distinguish between BEAST_BSD and BEAST_FREEBSD
|
||||
#elif BEAST_BSD
|
||||
#define OS_FREEBSD
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if BEAST_MSVC
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
@deprecated
|
||||
*/
|
||||
|
||||
// needed before inclusion of stdint.h for INT32_MIN/INT32_MAX macros
|
||||
#ifndef __STDC_LIMIT_MACROS
|
||||
#define __STDC_LIMIT_MACROS
|
||||
#endif
|
||||
|
||||
// VFALCO NOTE Log dependencies have wormed their way into websocketpp,
|
||||
// which needs the ripple_basic module to compile.
|
||||
@@ -38,11 +42,6 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO TODO This include is just to prevent a warning about
|
||||
// redefinition of __STDC_LIMIT_MACROS. Fix it right.
|
||||
//
|
||||
#include "websocket/src/rng/boost_rng.hpp"
|
||||
|
||||
#include "websocket/src/common.hpp"
|
||||
#include "websocket/src/sockets/socket_base.hpp"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user