diff -uNr a/src/db.cpp b/src/db.cpp --- a/src/db.cpp Thu Feb 12 23:03:38 2015 +++ b/src/db.cpp Thu Feb 12 23:04:54 2015 @@ -90,7 +90,6 @@ dbenv.set_errfile(fopen(strErrorFile.c_str(), "a")); /// debug dbenv.set_flags(DB_AUTO_COMMIT, 1); dbenv.set_flags(DB_TXN_WRITE_NOSYNC, 1); - dbenv.log_set_config(DB_LOG_AUTO_REMOVE, 1); ret = dbenv.open(strDataDir.c_str(), DB_CREATE | DB_INIT_LOCK | diff -uNr a/src/makefile.unix b/src/makefile.unix --- a/src/makefile.unix Thu Feb 12 23:03:38 2015 +++ b/src/makefile.unix Thu Feb 12 23:29:53 2015 @@ -4,9 +4,21 @@ DEFS=-DNOPCH -DEFS += $(addprefix -I,$(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH)) -LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH)) +INCLUDEPATHS= \ + "/usr/local/include/db4" \ + "/usr/local/include/boost" \ + "/usr/local/include" +LIBPATHS= \ + "/usr/local/lib/db4" \ + "/usr/local/lib" \ + "/usr/lib" + +BOOST_LIB_SUFFIX=-mt + +DEFS += $(addprefix -I,$(INCLUDEPATHS) $(OPENSSL_INCLUDE_PATH)) +LIBS += $(addprefix -L,$(LIBPATHS) $(OPENSSL_LIB_PATH)) + LMODE = dynamic LMODE2 = dynamic ifdef STATIC @@ -17,6 +29,7 @@ else TESTDEFS += -DBOOST_TEST_DYN_LINK endif + # for boost 1.37, add -mt to the boost libraries LIBS += \ @@ -25,14 +38,14 @@ -l boost_filesystem$(BOOST_LIB_SUFFIX) \ -l boost_program_options$(BOOST_LIB_SUFFIX) \ -l boost_thread$(BOOST_LIB_SUFFIX) \ - -l db_cxx$(BDB_LIB_SUFFIX) \ + -l db_cxx \ -l ssl \ -l crypto + LIBS+= \ -Wl,-B$(LMODE2) \ -l z \ - -l dl \ -l pthread @@ -54,7 +67,7 @@ # Make some important things such as the global offset table read only as soon as # the dynamic linker is finished building it. This will prevent overwriting of addresses # which would later be jumped to. - HARDENING+=-Wl,-z,relro -Wl,-z,now + #HARDENING+=-Wl,-z,relro -Wl,-z,now # Build position independent code to take advantage of Address Space Layout Randomization # offered by some kernels. @@ -66,11 +79,10 @@ # -D_FORTIFY_SOURCE=2 does some checking for potentially exploitable code patterns in # the source such overflowing a statically defined buffer. HARDENING+=-D_FORTIFY_SOURCE=2 -# DEBUGFLAGS=-g -CXXFLAGS=-O2 +CXXFLAGS=-O2 -fpermissive xCXXFLAGS=-pthread -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) HEADERS = \ base58.h \ diff -uNr a/src/protocol.cpp b/src/protocol.cpp --- a/src/protocol.cpp Thu Feb 12 23:03:38 2015 +++ b/src/protocol.cpp Thu Feb 12 16:09:40 2015 @@ -6,6 +6,8 @@ #include "protocol.h" #include "util.h" #include +#include +#include // Prototypes from net.h, but that header (currently) stinks, can't #include it without breaking things