Re: Qt 5.6 patch for QMutex problem

2016-08-15 Thread Adriaan de Groot
On Monday 15 August 2016 13:38:00 Gleb Popov wrote:
> This is the patch against 5.6 branch that fixes the QMutex problem:
> 
> diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp


Thanks. I've added it to the area51 repo, in trunk (which is Qt 5.6).

[ade]


Qt 5.6 patch for QMutex problem

2016-08-15 Thread Gleb Popov
This is the patch against 5.6 branch that fixes the QMutex problem:

diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp
index fa3bb08..db8e33e 100644
--- a/src/corelib/thread/qmutex.cpp
+++ b/src/corelib/thread/qmutex.cpp
@@ -571,7 +571,7 @@ const int
FreeListConstants::Sizes[FreeListConstants::BlockCount] = {

 typedef QFreeList FreeList;
 // We cannot use Q_GLOBAL_STATIC because it uses QMutex
-#if defined(Q_COMPILER_THREADSAFE_STATICS)
+#if defined(Q_COMPILER_THREADSAFE_STATICS) && !defined(Q_OS_FREEBSD)
 FreeList *freelist()
 {
 static FreeList list;


There was another proposed patch (which also worked fine), which involved
moving

 static FreeList list;

line out of the freelist() function to the global scope.