aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2016-04-30 22:46:21 -0300
committerdequis <dx@dxzone.com.ar>2016-04-30 22:46:21 -0300
commit720f7a9434d30c3fa41544c3e6f0f00f3c348a5c (patch)
tree900964d0c8efdc444f30aa80456ae972539928f9 /lib
parenta244877191da5159d56e34dca57e881a639061ce (diff)
ssl_gnutls: Replace GNUTLS_STUPID_CAST with (long)
That's what the gnutls code itself uses, in all platforms. There's a newer method that does this in a cleaner way, but it's not supported in all the gnutls versions that bitlbee works with, so this is simpler.
Diffstat (limited to 'lib')
-rw-r--r--lib/ssl_gnutls.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/ssl_gnutls.c b/lib/ssl_gnutls.c
index d7200951..c9b35fff 100644
--- a/lib/ssl_gnutls.c
+++ b/lib/ssl_gnutls.c
@@ -41,12 +41,6 @@ gnutls_certificate_credentials_t xcred;
#include <limits.h>
-#if defined(ULONG_MAX) && ULONG_MAX > 4294967295UL
-#define GNUTLS_STUPID_CAST (long)
-#else
-#define GNUTLS_STUPID_CAST (int)
-#endif
-
#define SSLDEBUG 0
struct scd {
@@ -334,7 +328,7 @@ static gboolean ssl_connected(gpointer data, gint source, b_input_condition cond
}
sock_make_nonblocking(conn->fd);
- gnutls_transport_set_ptr(conn->session, (gnutls_transport_ptr_t) GNUTLS_STUPID_CAST conn->fd);
+ gnutls_transport_set_ptr(conn->session, (gnutls_transport_ptr_t) (long) conn->fd);
ssl_cache_resume(conn);