diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-12-20 01:49:56 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-12-20 01:49:56 +0000 |
commit | 30be4d7d2806b014770312920fcda743d4dc67d0 (patch) | |
tree | 229c7337dfd56654c52009367273c078b016a25c /dev-libs/xalan-c/files | |
parent | f287ecad888abdeb38e617d0485de282cd6819db (diff) |
gentoo auto-resync : 20:12:2022 - 01:49:56
Diffstat (limited to 'dev-libs/xalan-c/files')
-rw-r--r-- | dev-libs/xalan-c/files/xalan-c-1.12-fix-threads.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/dev-libs/xalan-c/files/xalan-c-1.12-fix-threads.patch b/dev-libs/xalan-c/files/xalan-c-1.12-fix-threads.patch new file mode 100644 index 000000000000..4a8e0e582621 --- /dev/null +++ b/dev-libs/xalan-c/files/xalan-c-1.12-fix-threads.patch @@ -0,0 +1,51 @@ +xercesc::XMLMutex doesn't work, replace it by std::mutex +Bug: https://bugs.gentoo.org/887197 + +--- a/Tests/Threads/ThreadTest.cpp ++++ b/Tests/Threads/ThreadTest.cpp +@@ -49,6 +49,7 @@ + + #if defined(XALAN_USE_THREAD_STD) + #include <thread> ++#include <mutex> + #elif defined(XALAN_USE_THREAD_WINDOWS) + + #include <process.h> +@@ -95,8 +96,8 @@ + + + +-typedef xercesc::XMLMutex XMLMutexType; +-typedef xercesc::XMLMutexLock XMLMutexLockType; ++typedef std::mutex XMLMutexType; ++typedef std::lock_guard<std::mutex> XMLMutexLockType; + + + +@@ -121,7 +122,7 @@ + + XMLMutexType m_mutex; + +- long m_counter; ++ volatile long m_counter; + }; + + +@@ -143,7 +144,7 @@ + void + SynchronizedCounter::increment() + { +- const XMLMutexLockType theLock(&m_mutex); ++ const XMLMutexLockType theLock(m_mutex); + + if (m_counter < LONG_MAX) + { +@@ -156,7 +157,7 @@ + void + SynchronizedCounter::decrement() + { +- const XMLMutexLockType theLock(&m_mutex); ++ const XMLMutexLockType theLock(m_mutex); + + if (m_counter > 0) + { |