From 720f7a9434d30c3fa41544c3e6f0f00f3c348a5c Mon Sep 17 00:00:00 2001 From: dequis Date: Sat, 30 Apr 2016 22:46:21 -0300 Subject: 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. --- lib/ssl_gnutls.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib') 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 -#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); -- cgit v1.2.3