Fix for boost 1.34.1.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user