diff options
author | Christian Pointner <equinox@anytun.org> | 2016-01-23 23:32:35 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2016-01-23 23:32:35 +0000 |
commit | 8d6efd45db0073e156d160436aebb1c7c7de3d7a (patch) | |
tree | 054b635537be528d93744971ba518d8f44ccae47 /src/cryptinit.hpp | |
parent | fixed warning due to change of handling of exceptions inside descrutors since... (diff) |
since libgcrypt 1.6 it is no longer needed to configure the threading callbacks
Diffstat (limited to 'src/cryptinit.hpp')
-rw-r--r-- | src/cryptinit.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cryptinit.hpp b/src/cryptinit.hpp index cd11215..663ba0a 100644 --- a/src/cryptinit.hpp +++ b/src/cryptinit.hpp @@ -51,24 +51,28 @@ #if defined(USE_GCRYPT) #include <gcrypt.h> +#if GCRYPT_VERSION_NUMBER < 0x010600 #if defined(BOOST_HAS_PTHREADS) // boost thread callbacks for libgcrypt GCRY_THREAD_OPTION_PTHREAD_IMPL; #else #error You can not use gcrypt without pthreads - please configure Boost to use pthreads! -#endif +#endif // defined(BOOST_HAS_PTHREADS) +#endif // GCRYPT_VERSION_NUMBER < 0x010600 #define MIN_GCRYPT_VERSION "1.2.0" bool initLibGCrypt() { +#if GCRYPT_VERSION_NUMBER < 0x010600 #if defined(BOOST_HAS_PTHREADS) // make libgcrypt thread safe // this must be called before any other libgcrypt call gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); #else #error You can not use gcrypt without pthreads - please configure Boost to use pthreads! -#endif +#endif // defined(BOOST_HAS_PTHREADS) +#endif // GCRYPT_VERSION_NUMBER < 0x010600 // this must be called right after the GCRYCTL_SET_THREAD_CBS command // no other function must be called till now |