Merged revisions 65965-65967 via svnmerge from
[asterisk/asterisk.git] / channels / chan_gtalk.c
index c224c1e..03b99f6 100644 (file)
@@ -47,10 +47,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include <arpa/inet.h>
 #include <sys/signal.h>
 #include <iksemel.h>
+#include <pthread.h>
 
+#ifdef HAVE_GNUTLS
 #include <gcrypt.h>
-#include <pthread.h>
 GCRY_THREAD_OPTION_PTHREAD_IMPL;
+#endif /* HAVE_GNUTLS */
 
 #include "asterisk/lock.h"
 #include "asterisk/channel.h"
@@ -1820,7 +1822,9 @@ static int gtalk_load_config(void)
 /*! \brief Load module into PBX, register channel */
 static int load_module(void)
 {
+#ifdef HAVE_GNUTLS     
         gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
+#endif /* HAVE_GNUTLS */
 
        ASTOBJ_CONTAINER_INIT(&gtalk_list);
        if (!gtalk_load_config()) {