From 444b381ed174cc3add791197073a419f36ae8c69 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 14 Oct 2010 15:13:33 -0700 Subject: [PATCH] stream-ssl: Avoid warning with recent OpenSSL. Reported-by: Ethan Jackson --- lib/stream-ssl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c index 9c7533d1e..05ba59151 100644 --- a/lib/stream-ssl.c +++ b/lib/stream-ssl.c @@ -988,7 +988,9 @@ do_ssl_init(void) SSL_library_init(); SSL_load_error_strings(); - method = TLSv1_method(); + /* New OpenSSL changed TLSv1_method() to return a "const" pointer, so the + * cast is needed to avoid a warning with those newer versions. */ + method = (SSL_METHOD *) TLSv1_method(); if (method == NULL) { VLOG_ERR("TLSv1_method: %s", ERR_error_string(ERR_get_error(), NULL)); return ENOPROTOOPT; -- 2.43.0