gentoo/dev-cpp/commoncpp2/files/1.8.1-libgcrypt.patch
David Seifert 46aee353c3
dev-cpp/commoncpp2: Allow for compiling with GCC 6
Gentoo-bug: 595422
* EAPI=6
* Make PATCHES -p1 compliant

Package-Manager: portage-2.3.1
2016-09-29 21:42:14 +02:00

49 lines
1.0 KiB
Diff

--- a/src/ssl.cpp
+++ b/src/ssl.cpp
@@ -99,35 +99,7 @@
return 0;
}
-extern "C" {
- static int _wrap_mutex_init(void **priv)
- {
- return _gcry_mutex_init((Mutex **)(priv));
- }
-
- static int _wrap_mutex_destroy(void **priv)
- {
- return _gcry_mutex_destroy((Mutex **)(priv));
- }
-
- static int _wrap_mutex_lock(void **priv)
- {
- return _gcry_mutex_lock((Mutex **)(priv));
- }
-
- static int _wrap_mutex_unlock(void **priv)
- {
- return _gcry_mutex_unlock((Mutex **)(priv));
- }
-
- static struct gcry_thread_cbs _gcry_threads =
- {
- GCRY_THREAD_OPTION_PTHREAD, NULL,
- _wrap_mutex_init, _wrap_mutex_destroy,
- _wrap_mutex_lock, _wrap_mutex_unlock
- };
-
-};
+GCRY_THREAD_OPTION_PTHREAD_IMPL;
#endif
@@ -135,7 +107,7 @@
public:
_ssl_global() {
#ifndef WIN32
- gcry_control(GCRYCTL_SET_THREAD_CBS, &_gcry_threads);
+ gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
#endif
gnutls_global_init();
}