add patch for boost 1.66, separate patches from the BSD fixes bundle that are also present in the Gentoo ebuild
This commit is contained in:
4
INSTALL
4
INSTALL
@@ -12,10 +12,10 @@ FreeBSD cribsheet for bitgemd
|
||||
|
||||
make sure boost-libs, db48, miniupnpc, and gmake are installed, then:
|
||||
|
||||
patch -p0 <bsd-fixes.patch
|
||||
cat *.patch | patch -p1
|
||||
cd src
|
||||
BDB_INCLUDE_PATH=/usr/local/include/db48 \
|
||||
BDB_LIB_PATH=/usr/local/lib/db48 \
|
||||
BOOST_INCLUDE_PATH=/usr/local/include \
|
||||
BOOST_LIB_PATH=/usr/local/lib \
|
||||
USE_UPNP=1 gmake -f makefile.unix bitgemd
|
||||
USE_UPNP=1 gmake -f makefile.bsd bitgemd
|
||||
|
||||
13
array-disambiguation.patch
Normal file
13
array-disambiguation.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/net.cpp b/src/net.cpp
|
||||
index 96cd0cdf..563ddf88 100644
|
||||
--- a/src/net.cpp
|
||||
+++ b/src/net.cpp
|
||||
@@ -57,7 +57,7 @@ static bool vfLimited[NET_MAX] = {};
|
||||
static CNode* pnodeLocalHost = NULL;
|
||||
CAddress addrSeenByPeer(CService("0.0.0.0", 0), nLocalServices);
|
||||
uint64 nLocalHostNonce = 0;
|
||||
-array<int, THREAD_MAX> vnThreadsRunning;
|
||||
+boost::array<int, THREAD_MAX> vnThreadsRunning;
|
||||
static std::vector<SOCKET> vhListenSocket;
|
||||
CAddrMan addrman;
|
||||
|
||||
73
boost-1.66-fixes.patch
Normal file
73
boost-1.66-fixes.patch
Normal file
@@ -0,0 +1,73 @@
|
||||
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
|
||||
index 64e5c406..f6f7b843 100644
|
||||
--- a/src/bitcoinrpc.cpp
|
||||
+++ b/src/bitcoinrpc.cpp
|
||||
@@ -650,8 +650,8 @@ void ThreadRPCServer(void* parg)
|
||||
}
|
||||
|
||||
// Forward declaration required for RPCListen
|
||||
-template <typename Protocol, typename SocketAcceptorService>
|
||||
-static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
|
||||
+template <typename Protocol>
|
||||
+static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
|
||||
ssl::context& context,
|
||||
bool fUseSSL,
|
||||
AcceptedConnection* conn,
|
||||
@@ -660,8 +660,8 @@ static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol,
|
||||
/**
|
||||
* Sets up I/O resources to accept and handle a new connection.
|
||||
*/
|
||||
-template <typename Protocol, typename SocketAcceptorService>
|
||||
-static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
|
||||
+template <typename Protocol>
|
||||
+static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
|
||||
ssl::context& context,
|
||||
const bool fUseSSL)
|
||||
{
|
||||
@@ -671,7 +671,7 @@ static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketA
|
||||
acceptor->async_accept(
|
||||
conn->sslStream.lowest_layer(),
|
||||
conn->peer,
|
||||
- boost::bind(&RPCAcceptHandler<Protocol, SocketAcceptorService>,
|
||||
+ boost::bind(&RPCAcceptHandler<Protocol>,
|
||||
acceptor,
|
||||
boost::ref(context),
|
||||
fUseSSL,
|
||||
@@ -682,8 +682,8 @@ static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketA
|
||||
/**
|
||||
* Accept and handle incoming connection.
|
||||
*/
|
||||
-template <typename Protocol, typename SocketAcceptorService>
|
||||
-static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
|
||||
+template <typename Protocol>
|
||||
+static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
|
||||
ssl::context& context,
|
||||
const bool fUseSSL,
|
||||
AcceptedConnection* conn,
|
||||
@@ -758,7 +758,7 @@ void ThreadRPCServer2(void* parg)
|
||||
|
||||
asio::io_service io_service;
|
||||
|
||||
- ssl::context context(io_service, ssl::context::sslv23);
|
||||
+ ssl::context context(ssl::context::sslv23);
|
||||
if (fUseSSL)
|
||||
{
|
||||
context.set_options(ssl::context::no_sslv2);
|
||||
@@ -774,7 +774,7 @@ void ThreadRPCServer2(void* parg)
|
||||
else printf("ThreadRPCServer ERROR: missing server private key file %s\n", pathPKFile.string().c_str());
|
||||
|
||||
string strCiphers = GetArg("-rpcsslciphers", "TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH");
|
||||
- SSL_CTX_set_cipher_list(context.impl(), strCiphers.c_str());
|
||||
+ SSL_CTX_set_cipher_list(context.native_handle(), strCiphers.c_str());
|
||||
}
|
||||
|
||||
// Try a dual IPv6/IPv4 socket, falling back to separate IPv4 and IPv6 sockets
|
||||
@@ -1068,7 +1068,7 @@ Object CallRPC(const string& strMethod, const Array& params)
|
||||
// Connect to localhost
|
||||
bool fUseSSL = GetBoolArg("-rpcssl");
|
||||
asio::io_service io_service;
|
||||
- ssl::context context(io_service, ssl::context::sslv23);
|
||||
+ ssl::context context(ssl::context::sslv23);
|
||||
context.set_options(ssl::context::no_sslv2);
|
||||
asio::ssl::stream<asio::ip::tcp::socket> sslStream(io_service, context);
|
||||
SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL);
|
||||
145
bsd-fixes.patch
145
bsd-fixes.patch
@@ -1,28 +1,8 @@
|
||||
--- src/serialize.h 2017-09-12 08:55:41.000000000 -0700
|
||||
+++ src/serialize.h 2017-09-12 09:07:31.989996942 -0700
|
||||
@@ -811,19 +811,6 @@
|
||||
iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); }
|
||||
void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); }
|
||||
|
||||
- void insert(iterator it, const_iterator first, const_iterator last)
|
||||
- {
|
||||
- assert(last - first >= 0);
|
||||
- if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos)
|
||||
- {
|
||||
- // special case for inserting at the front when there's room
|
||||
- nReadPos -= (last - first);
|
||||
- memcpy(&vch[nReadPos], &first[0], last - first);
|
||||
- }
|
||||
- else
|
||||
- vch.insert(it, first, last);
|
||||
- }
|
||||
-
|
||||
void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
|
||||
{
|
||||
assert(last - first >= 0);
|
||||
--- src/pbkdf2.cpp 2017-09-12 08:55:41.000000000 -0700
|
||||
+++ src/pbkdf2.cpp 2017-09-12 09:30:53.978369218 -0700
|
||||
@@ -3,25 +3,6 @@
|
||||
diff --git a/src/pbkdf2.cpp b/src/pbkdf2.cpp
|
||||
index dd0d85d2..d0a74d0b 100644
|
||||
--- a/src/pbkdf2.cpp
|
||||
+++ b/src/pbkdf2.cpp
|
||||
@@ -3,28 +3,6 @@
|
||||
#include <string.h>
|
||||
#include "pbkdf2.h"
|
||||
|
||||
@@ -45,39 +25,100 @@
|
||||
- p[1] = (x >> 16) & 0xff;
|
||||
- p[0] = (x >> 24) & 0xff;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-
|
||||
/* Initialize an HMAC-SHA256 operation with the given key. */
|
||||
void
|
||||
HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen)
|
||||
diff --git a/src/serialize.h b/src/serialize.h
|
||||
index 3b3dcd4f..4f8e0539 100644
|
||||
--- a/src/serialize.h
|
||||
+++ b/src/serialize.h
|
||||
@@ -824,19 +824,6 @@ public:
|
||||
vch.insert(it, first, last);
|
||||
}
|
||||
|
||||
- void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
|
||||
- {
|
||||
- assert(last - first >= 0);
|
||||
- if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos)
|
||||
- {
|
||||
- // special case for inserting at the front when there's room
|
||||
- nReadPos -= (last - first);
|
||||
- memcpy(&vch[nReadPos], &first[0], last - first);
|
||||
- }
|
||||
- else
|
||||
- vch.insert(it, first, last);
|
||||
- }
|
||||
-
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1300
|
||||
void insert(iterator it, const char* first, const char* last)
|
||||
{
|
||||
diff --git a/src/makefile.bsd b/src/makefile.bsd
|
||||
index e9d49b8e..984312ba 100644
|
||||
--- a/src/makefile.bsd
|
||||
+++ b/src/makefile.bsd
|
||||
@@ -2,8 +2,9 @@
|
||||
# Distributed under the MIT/X11 software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
-USE_UPNP:=0
|
||||
+USE_UPNP:=1
|
||||
USE_IPV6:=1
|
||||
+BDB_LIB_SUFFIX=-4.8
|
||||
|
||||
LINK:=$(CXX)
|
||||
|
||||
@@ -28,6 +29,7 @@ endif
|
||||
# for boost 1.37, add -mt to the boost libraries
|
||||
LIBS += \
|
||||
-Wl,-B$(LMODE) \
|
||||
+ -L /usr/local/lib \
|
||||
-l boost_system$(BOOST_LIB_SUFFIX) \
|
||||
-l boost_filesystem$(BOOST_LIB_SUFFIX) \
|
||||
-l boost_program_options$(BOOST_LIB_SUFFIX) \
|
||||
@@ -52,7 +54,7 @@ endif
|
||||
LIBS+= \
|
||||
-Wl,-B$(LMODE2) \
|
||||
-l z \
|
||||
- -l dl \
|
||||
+# -l dl \
|
||||
-l pthread
|
||||
|
||||
|
||||
@@ -130,6 +132,7 @@ OBJS= \
|
||||
obj/walletdb.o \
|
||||
obj/noui.o \
|
||||
obj/kernel.o \
|
||||
+ obj/gem.o \
|
||||
obj/pbkdf2.o \
|
||||
obj/scrypt_mine.o \
|
||||
obj/scrypt-x86.o \
|
||||
diff --git a/src/makefile.unix b/src/makefile.unix
|
||||
index 4b359f9d..9c959f5f 100644
|
||||
--- a/src/makefile.unix
|
||||
+++ b/src/makefile.unix
|
||||
@@ -2,15 +2,16 @@
|
||||
# Distributed under the MIT/X11 software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
--- src/net.cpp 2017-09-12 08:55:41.000000000 -0700
|
||||
+++ src/net.cpp 2017-09-12 09:49:03.314788989 -0700
|
||||
@@ -57,7 +57,7 @@
|
||||
static CNode* pnodeLocalHost = NULL;
|
||||
CAddress addrSeenByPeer(CService("0.0.0.0", 0), nLocalServices);
|
||||
uint64 nLocalHostNonce = 0;
|
||||
-array<int, THREAD_MAX> vnThreadsRunning;
|
||||
+boost::array<int, THREAD_MAX> vnThreadsRunning;
|
||||
static std::vector<SOCKET> vhListenSocket;
|
||||
CAddrMan addrman;
|
||||
-USE_UPNP:=0
|
||||
+USE_UPNP:=1
|
||||
USE_IPV6:=1
|
||||
+BDB_LIB_SUFFIX=-4.8
|
||||
|
||||
@@ -1028,14 +1028,8 @@
|
||||
struct UPNPDev * devlist = 0;
|
||||
char lanaddr[64];
|
||||
LINK:=$(CXX)
|
||||
|
||||
-#ifndef UPNPDISCOVER_SUCCESS
|
||||
- /* miniupnpc 1.5 */
|
||||
- devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
|
||||
-#else
|
||||
- /* miniupnpc 1.6 */
|
||||
int error = 0;
|
||||
- devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
|
||||
-#endif
|
||||
+ devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
|
||||
DEFS=-DBOOST_SPIRIT_THREADSAFE
|
||||
|
||||
struct UPNPUrls urls;
|
||||
struct IGDdatas data;
|
||||
--- src/makefile.unix 2017-09-12 08:55:41.000000000 -0700
|
||||
+++ src/makefile.unix 2017-09-12 09:55:51.224522062 -0700
|
||||
@@ -51,7 +51,7 @@
|
||||
DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH))
|
||||
-LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH))
|
||||
+LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH) /usr/local/lib)
|
||||
|
||||
TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
|
||||
|
||||
@@ -51,7 +52,7 @@ endif
|
||||
LIBS+= \
|
||||
-Wl,-B$(LMODE2) \
|
||||
-l z \
|
||||
|
||||
13
miniupnpc-fix.patch
Normal file
13
miniupnpc-fix.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/net.cpp b/src/net.cpp
|
||||
index 96cd0cdf..563ddf88 100644
|
||||
--- a/src/net.cpp
|
||||
+++ b/src/net.cpp
|
||||
@@ -1034,7 +1034,7 @@ void ThreadMapPort2(void* parg)
|
||||
#else
|
||||
/* miniupnpc 1.6 */
|
||||
int error = 0;
|
||||
- devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
|
||||
+ devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
|
||||
#endif
|
||||
|
||||
struct UPNPUrls urls;
|
||||
Reference in New Issue
Block a user