{"thread":{"id":"21444","subject":"[PATCH v4] imap-send.c: fix compiler warnings for OpenSSL 1.0","startedAt":"2009-10-31T06:36:03Z","lastAt":"2009-10-31T21:34:17Z","messageCount":2,"participants":["Vietor Liu","Junio C Hamano"],"isPatch":true,"patchVersion":4,"patchTotal":null},"messages":[{"id":"126514","messageId":"1256970963-6345-1-git-send-email-vietor@vxwo.org","threadId":"21444","inReplyTo":null,"subject":"[PATCH v4] imap-send.c: fix compiler warnings for OpenSSL 1.0","fromName":"Vietor Liu","fromEmail":"vietor@vxwo.org","sentAt":"2009-10-31T06:36:03Z","receivedAt":"2009-10-31T06:36:03Z","isPatch":true,"sender":{"key":"vietor@vxwo.org","avatar":"https://gravatar.com/avatar/5aec20a4fda090db11446ebfef48ef01e702e5cef0710640a676ccbfce1f4fe3?d=mp&s=160"},"body":"Fedora 12 has upgraded OpenSSL to 1.0.0-beta3 version.\nWhen compiling git on Fedora 12, the following warning is displayed:\n\nimap-send.c: In function ‘ssl_socket_connect’:\nimap-send.c:284: warning: assignment discards qualifiers from pointer target type\nimap-send.c:286: warning: assignment discards qualifiers from pointer target type\n\n==============================================\nThe relevant change in OpenSSL 1.0:\n\n*) Let the TLSv1_method() etc. functions return a 'const' SSL_METHOD\n     pointer and make the SSL_METHOD parameter in SSL_CTX_new,\n     SSL_CTX_set_ssl_version and SSL_set_ssl_method 'const'.\n\nSigned-off-by: Vietor Liu <vietor@vxwo.org>\n---\n imap-send.c |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/imap-send.c b/imap-send.c\nindex 3847fd1..f805c6e 100644\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -273,7 +273,11 @@ static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve\n \tfprintf(stderr, \"SSL requested but SSL support not compiled in\\n\");\n \treturn -1;\n #else\n+#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)\n+\tconst SSL_METHOD *meth;\n+#else\n \tSSL_METHOD *meth;\n+#endif\n \tSSL_CTX *ctx;\n \tint ret;\n \n-- \n1.6.5.2\n"},{"id":"126539","messageId":"7v3a4z5jty.fsf@alter.siamese.dyndns.org","threadId":"21444","inReplyTo":"1256970963-6345-1-git-send-email-vietor@vxwo.org","subject":"Re: [PATCH v4] imap-send.c: fix compiler warnings for OpenSSL 1.0","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-31T21:34:17Z","receivedAt":"2009-10-31T21:34:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"}]}