From: Vietor Liu <vietor@vxwo.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH v4] imap-send.c: fix compiler warnings for OpenSSL 1.0
Date: Sat, 31 Oct 2009 14:36:03 +0800 [thread overview]
Message-ID: <1256970963-6345-1-git-send-email-vietor@vxwo.org> (raw)
Fedora 12 has upgraded OpenSSL to 1.0.0-beta3 version.
When compiling git on Fedora 12, the following warning is displayed:
imap-send.c: In function ‘ssl_socket_connect’:
imap-send.c:284: warning: assignment discards qualifiers from pointer target type
imap-send.c:286: warning: assignment discards qualifiers from pointer target type
==============================================
The relevant change in OpenSSL 1.0:
*) 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'.
Signed-off-by: Vietor Liu <vietor@vxwo.org>
---
imap-send.c | 4 ++++
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;
--
1.6.5.2
next reply other threads:[~2009-10-31 6:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-31 6:36 Vietor Liu [this message]
2009-10-31 21:34 ` [PATCH v4] imap-send.c: fix compiler warnings for OpenSSL 1.0 Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1256970963-6345-1-git-send-email-vietor@vxwo.org \
--to=vietor@vxwo.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).