From: Eneas U de Queiroz Date: Tue, 29 Oct 2019 21:24:16 +0000 (-0300) Subject: wolfssl: adjust to new API in v4.2.0 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=465f8dc31d85cdd54369a5650d5daa1d3995dfaa;p=oweals%2Fopenwrt-ustream-ssl.git 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 --- 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) {