]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_ssl_gnutls.cpp
AMD64 warning 'fix' which tested fine when I added it seems to now...stop things...
[user/henk/code/inspircd.git] / src / modules / extra / m_ssl_gnutls.cpp
index 5155b4f6cc623b7d0de67714bbcc77353d2ea6fe..49078e262b43c0e9eb58826c7c1c856c96000b59 100644 (file)
@@ -248,7 +248,14 @@ class ModuleSSLGnuTLS : public Module
                gnutls_credentials_set(session->sess, GNUTLS_CRD_CERTIFICATE, x509_cred);
                gnutls_certificate_server_set_request(session->sess, GNUTLS_CERT_REQUEST); // Request client certificate if any.
                gnutls_dh_set_prime_bits(session->sess, dh_bits);
+               
+               /* This is an experimental change to avoid a warning on 64bit systems about casting between integer and pointer of different sizes
+                * This needs testing, but it's easy enough to rollback if need be
+                * Old: gnutls_transport_set_ptr(session->sess, (gnutls_transport_ptr_t) fd); // Give gnutls the fd for the socket.
+                */
+               
                gnutls_transport_set_ptr(session->sess, (gnutls_transport_ptr_t) fd); // Give gnutls the fd for the socket.
+               // gnutls_transport_set_ptr(session->sess, &fd); // Give gnutls the fd for the socket.
                
                Handshake(session);
        }
@@ -606,4 +613,3 @@ extern "C" void * init_module( void )
 {
        return new ModuleSSLGnuTLSFactory;
 }
-