diff options
Diffstat (limited to 'libraries/libvmime-zarafa/zarafa-patches/vmime-threading-remove-static_non-abi-change.diff')
-rw-r--r-- | libraries/libvmime-zarafa/zarafa-patches/vmime-threading-remove-static_non-abi-change.diff | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libraries/libvmime-zarafa/zarafa-patches/vmime-threading-remove-static_non-abi-change.diff b/libraries/libvmime-zarafa/zarafa-patches/vmime-threading-remove-static_non-abi-change.diff new file mode 100644 index 0000000000..b5bd15ffd8 --- /dev/null +++ b/libraries/libvmime-zarafa/zarafa-patches/vmime-threading-remove-static_non-abi-change.diff @@ -0,0 +1,40 @@ +--- libvmime-0.7.1.orig/vmime/utility/smartPtr.hpp 2005-05-19 19:17:17.000000000 +0200 ++++ libvmime-0.7.1.patched/vmime/utility/smartPtr.hpp 2009-05-13 15:21:53.276875219 +0200 +@@ -20,6 +20,9 @@ + #ifndef VMIME_UTILITY_SMARTPTR_HPP_INCLUDED + #define VMIME_UTILITY_SMARTPTR_HPP_INCLUDED + ++// non-portable, but atleast not an abi change ++#include <pthread.h> ++static pthread_mutex_t mapLock = PTHREAD_MUTEX_INITIALIZER; + + namespace vmime { + namespace utility { +@@ -108,8 +111,10 @@ + { + if (m_data->refCount == 1) + { ++ pthread_mutex_lock(&mapLock); + typename MapType::iterator it = sm_map.find(m_data->ptr); + if (it != sm_map.end()) sm_map.erase(it); ++ pthread_mutex_unlock(&mapLock); + + delete (m_data->ptr); + delete (m_data); +@@ -127,6 +132,8 @@ + { + detach(); + ++ pthread_mutex_lock(&mapLock); ++ + typename MapType::iterator it = sm_map.find(p); + + if (it != sm_map.end()) +@@ -141,6 +148,7 @@ + + sm_map.insert(typename MapType::value_type(p, m_data)); + } ++ pthread_mutex_unlock(&mapLock); + } + + void attach(const smart_ptr <T>& p) |