projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
16faee0
)
Initialize gcrypt for threaded mode YAZ-751
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 13 Mar 2014 13:05:36 +0000
(14:05 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 13 Mar 2014 13:05:36 +0000
(14:05 +0100)
src/init_globals.c
patch
|
blob
|
history
diff --git
a/src/init_globals.c
b/src/init_globals.c
index
81cb966
..
79845f4
100644
(file)
--- a/
src/init_globals.c
+++ b/
src/init_globals.c
@@
-15,6
+15,7
@@
#if YAZ_POSIX_THREADS
#include <pthread.h>
#endif
#if YAZ_POSIX_THREADS
#include <pthread.h>
#endif
+#include <errno.h>
#if HAVE_GNUTLS_H
#include <gnutls/gnutls.h>
#if HAVE_GNUTLS_H
#include <gnutls/gnutls.h>
@@
-35,6
+36,10
@@
static pthread_mutex_t yaz_init_mutex = PTHREAD_MUTEX_INITIALIZER;
extern void yaz_log_init_globals(void);
extern void yaz_log_init_globals(void);
+#if HAVE_GCRYPT_H
+GCRY_THREAD_OPTION_PTHREAD_IMPL;
+#endif
+
void yaz_init_globals(void)
{
if (yaz_init_flag)
void yaz_init_globals(void)
{
if (yaz_init_flag)
@@
-52,6
+57,7
@@
void yaz_init_globals(void)
/* most likely, GnuTLS has already initialized libgcrypt */
if (gcry_control(GCRYCTL_ANY_INITIALIZATION_P) == 0)
{
/* most likely, GnuTLS has already initialized libgcrypt */
if (gcry_control(GCRYCTL_ANY_INITIALIZATION_P) == 0)
{
+ gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
gcry_control(GCRYCTL_INITIALIZATION_FINISHED, NULL, 0);
}
#endif
gcry_control(GCRYCTL_INITIALIZATION_FINISHED, NULL, 0);
}
#endif