summaryrefslogtreecommitdiff
path: root/libraries/libvmime-zarafa/zarafa-patches/vmime-threading-remove-static_non-abi-change.diff
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2010-05-13 00:58:59 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 00:58:59 +0200
commiteac700bacbf832b6899d0adeb6ef1ee4acb79967 (patch)
treedc91fa4dcdd229de60979d5946770042beda5adf /libraries/libvmime-zarafa/zarafa-patches/vmime-threading-remove-static_non-abi-change.diff
parent0c91a2e1a8826be4f48cda754fb9a833cd012e66 (diff)
downloadslackbuilds-eac700bacbf832b6899d0adeb6ef1ee4acb79967.tar.gz
libraries/libvmime-zarafa: Added to 13.0 repository
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.diff40
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)