summaryrefslogtreecommitdiff
path: root/imap-send.c
diff options
context:
space:
mode:
authorVietor Liu <vietor@vxwo.org>2009-10-31 06:36:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-10-31 21:28:18 (GMT)
commit1e380ddcd29f1e25bfb58b7068fdafb038c8dd9a (patch)
treebd121fe247d5b9c247dcb217c57d3fcf5cb83bff /imap-send.c
parentd52dc4b10b2f78dc24ea05e88ddc25ee0f46491e (diff)
downloadgit-1e380ddcd29f1e25bfb58b7068fdafb038c8dd9a.zip
git-1e380ddcd29f1e25bfb58b7068fdafb038c8dd9a.tar.gz
git-1e380ddcd29f1e25bfb58b7068fdafb038c8dd9a.tar.bz2
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>
Diffstat (limited to 'imap-send.c')
-rw-r--r--imap-send.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/imap-send.c b/imap-send.c
index 3847fd1..f805c6e 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -273,7 +273,11 @@ static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve
fprintf(stderr, "SSL requested but SSL support not compiled in\n");
return -1;
#else
+#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
+ const SSL_METHOD *meth;
+#else
SSL_METHOD *meth;
+#endif
SSL_CTX *ctx;
int ret;