commit - fb19b05e1e3d638062dcfc4c263b02e7429c4d20
commit + 125c05fba0315da143c3431a41bd930fcb992501
blob - 5a1000728a7b604753736c0be3f0f98cc02584fc
blob + cd7abd4bd38dcf79d688e448a9acecb98234dad5
--- src/ngircd/conn-ssl.c
+++ src/ngircd/conn-ssl.c
Log(LOG_ERR, "gnutls_set_default_priority: %s", gnutls_strerror(ret));
ConnSSL_Free(c);
}
- gnutls_transport_set_ptr(c->ssl_state.gnutls_session, (gnutls_transport_ptr_t) c->sock);
+ /*
+ * The intermediate (long) cast is here to avoid a warning like:
+ * "cast to pointer from integer of different size" on 64-bit platforms.
+ * There doesn't seem to be an alternate GNUTLS API we could use instead, see e.g.
+ * http://www.mail-archive.com/help-gnutls@gnu.org/msg00286.html
+ */
+ gnutls_transport_set_ptr(c->ssl_state.gnutls_session, (gnutls_transport_ptr_t) (long) c->sock);
ret = gnutls_credentials_set(c->ssl_state.gnutls_session, GNUTLS_CRD_CERTIFICATE, x509_cred);
if (ret < 0) {
Log(LOG_ERR, "gnutls_credentials_set: %s", gnutls_strerror(ret));