Fix for boost 1.34.1.

This commit is contained in:
lotodore
2008-04-25 09:28:03 +00:00
parent 56c9dd4863
commit 2e9e7e3aed
+9
View File
@@ -22,6 +22,7 @@
#include <core/openssl_wrapper.h>
#include <gcrypt.h>
#include <boost/thread.hpp>
#include <boost/version.hpp> // solve compatibility issues
extern "C" {
@@ -38,11 +39,19 @@ extern "C" {
return 0;
}
int gcry_bmutex_lock(void **obj) {
#if (BOOST_VERSION) >= 103500
((boost::mutex *)(*obj))->lock();
#else
boost::detail::thread::lock_ops<boost::mutex>::lock((boost::mutex *)(*obj));
#endif
return 0;
}
int gcry_bmutex_unlock(void **obj) {
#if (BOOST_VERSION) >= 103500
((boost::mutex *)(*obj))->unlock();
#else
boost::detail::thread::lock_ops<boost::mutex>::unlock((boost::mutex *)(*obj));
#endif
return 0;
}