git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v4] imap-send.c: fix compiler warnings for OpenSSL 1.0

From
Vietor Liu <vietor@vxwo.org>
Date
Oct 31, 2009, 06:36 UTC
Message-ID
<1256970963-6345-1-git-send-email-vietor@vxwo.org>

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: Junio C Hamano
Message 1 of 2 in “imap-send.c: fix compiler warnings for OpenSSL 1.0”
  1. imap-send.c: fix compiler warnings for OpenSSL 1.0Vietor Liu, Oct 31, 2009
  2. Junio C HamanoOct 31, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.