diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-06-02 12:47:27 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-06-02 12:47:27 +0200 |
commit | 40ec612e731f0ebbf7a7121d0f542e1996c99da3 (patch) | |
tree | f2452ca97c3891a806b37a205202cbda3871f25b /src/core/wee-hook.c | |
parent | bd436db2bc061efc9821e7a5e1443ff32bd0b0d0 (diff) | |
download | weechat-40ec612e731f0ebbf7a7121d0f542e1996c99da3.zip |
Fix compilation bug when gnutls dev lib is not installed
Diffstat (limited to 'src/core/wee-hook.c')
-rw-r--r-- | src/core/wee-hook.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index 99034c7b2..43ecb6d8f 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -798,6 +798,11 @@ hook_connect (struct t_weechat_plugin *plugin, char *address, int port, struct t_hook *new_hook; struct t_hook_connect *new_hook_connect; +#ifndef HAVE_GNUTLS + /* make C compiler happy */ + (void) gnutls_sess; +#endif + if ((sock < 0) || !address || (port <= 0)) return NULL; @@ -819,7 +824,9 @@ hook_connect (struct t_weechat_plugin *plugin, char *address, int port, new_hook_connect->port = port; new_hook_connect->sock = sock; new_hook_connect->ipv6 = ipv6; +#ifdef HAVE_GNUTLS new_hook_connect->gnutls_sess = gnutls_sess; +#endif new_hook_connect->local_hostname = (local_hostname) ? strdup (local_hostname) : NULL; new_hook_connect->child_read = -1; |