From 465f8dc31d85cdd54369a5650d5daa1d3995dfaa Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Tue, 29 Oct 2019 18:24:16 -0300 Subject: [PATCH] wolfssl: adjust to new API in v4.2.0 WolfSSL has recently added many openssl 1.1+ calls, including TLS_server_method & TLS_client_method, which were being redefined, causing compilation failure: ustream-openssl.c:113:0: error: "TLS_server_method" redefined [-Werror] ustream-openssl.c:114:0: error: "TLS_client_method" redefined [-Werror] Only define the symbols if not previously defined. Signed-off-by: Eneas U de Queiroz --- ustream-openssl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ustream-openssl.c b/ustream-openssl.c index c830618..1469473 100644 --- a/ustream-openssl.c +++ b/ustream-openssl.c @@ -110,8 +110,12 @@ __ustream_ssl_context_new(bool server) SSL_library_init(); _init = true; } -# define TLS_server_method SSLv23_server_method -# define TLS_client_method SSLv23_client_method +# ifndef TLS_server_method +# define TLS_server_method SSLv23_server_method +# endif +# ifndef TLS_client_method +# define TLS_client_method SSLv23_client_method +# endif #endif if (server) { -- 2.30.2