imap-send.c: fix compiler warnings for OpenSSL 1.0
The openssl/CHANGES file says: Let the TLSv1_method() etc. functions return a 'const' SSL_METHOD pointer and make the SSL_METHOD parameter in SSL_CTX_new, SSL_CTX_set_ssl_version and SSL_set_ssl_method 'const'. In older versions, unqualified pointers were used, so we unfortunately cannot unconditionally update the type of the variable we use. Signed-off-by: Vietor Liu <vietor@vxwo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Vietor Liu committed
Oct 31, 2009 at 14:36 UTC
1e380ddcd29f1e25bfb58b7068fdafb038c8dd9a
1 file changed
+4
imap-send.c
+4
@@ -272,8 +272,12 @@ static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve
272
#ifdef NO_OPENSSL
273
fprintf(stderr, "SSL requested but SSL support not compiled in\n");
274
return -1;
275
+#else
276
+#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
277
+ const SSL_METHOD *meth;
278
#else
279
SSL_METHOD *meth;
280
+#endif
281
SSL_CTX *ctx;
282
int ret;
283