Yavor Doganov's patch to avoid unnecessary link to libgcrypt

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37966 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2014-06-30 06:28:38 +00:00
parent 4cdd9aac1b
commit 21e157f656
5 changed files with 24 additions and 13 deletions

View file

@ -67,6 +67,7 @@ standardizedPath(NSString *path)
#if defined(HAVE_GNUTLS)
#if GNUTLS_VERSION_NUMBER <= 0x020b00
/* Set up locking callbacks for gcrypt so that it will be thread-safe.
*/
static int gcry_mutex_init(void **priv)
@ -98,6 +99,7 @@ static struct gcry_thread_cbs gcry_threads_other = {
gcry_mutex_lock,
gcry_mutex_unlock
};
#endif
static void
GSTLSLog(int level, const char *msg)
@ -324,9 +326,11 @@ static NSMutableDictionary *fileMap = nil;
name: NSUserDefaultsDidChangeNotification
object: nil];
#if GNUTLS_VERSION_NUMBER <= 0x020b00
/* Make gcrypt thread-safe
*/
gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_other);
#endif
/* Initialise gnutls
*/