aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp
index b0c80f6dfc..d143306aec 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -25,6 +25,7 @@ namespace boost {
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/foreach.hpp>
+#include <boost/thread.hpp>
#include <openssl/crypto.h>
#include <openssl/rand.h>
#include <stdarg.h>
@@ -209,6 +210,8 @@ inline int OutputDebugStringF(const char* pszFormat, ...)
if (fileout)
{
static bool fStartedNewLine = true;
+ static boost::mutex mutexDebugLog;
+ boost::mutex::scoped_lock scoped_lock(mutexDebugLog);
// Debug print useful for profiling
if (fLogTimestamps && fStartedNewLine)