From e49f14e6cbd90680e3563076e6a08aa42f942485 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Thu, 24 May 2007 18:25:21 +0000 Subject: [PATCH] don't reference GnuTLS headers and functions unless the configure script found it git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@65966 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_gtalk.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c index 657e0d83c8..39e4c7d9ee 100644 --- a/channels/chan_gtalk.c +++ b/channels/chan_gtalk.c @@ -47,10 +47,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include #include - -#include #include + +#if HAVE_GNUTLS +#include GCRY_THREAD_OPTION_PTHREAD_IMPL; +#endif /* HAVE_GNUTLS */ #include "asterisk/lock.h" #include "asterisk/channel.h" @@ -1809,7 +1811,9 @@ static int gtalk_load_config(void) /*! \brief Load module into PBX, register channel */ static int load_module(void) { +#if HAVE_GNUTLS gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); +#endif /* HAVE_GNUTLS */ ASTOBJ_CONTAINER_INIT(>alk_list); if (!gtalk_load_config()) {