From: Matt Caswell Date: Tue, 1 Dec 2020 15:19:56 +0000 (+0000) Subject: Fix a compile error with the no-sock option X-Git-Tag: openssl-3.0.0-alpha10~203 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c195c882335874505f58debf3f6bf750377c62af;p=thirdparty%2Fopenssl.git Fix a compile error with the no-sock option BIO_do_connect() can work even in no-sock builds (non socket based BIOs have the right ctrls). Therefore we move the macro outside of the OPENSSL_NO_SOCK guards Fixes #12207 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/13587) --- diff --git a/include/openssl/bio.h.in b/include/openssl/bio.h.in index d7380d47e9f..d52392def87 100644 --- a/include/openssl/bio.h.in +++ b/include/openssl/bio.h.in @@ -443,12 +443,11 @@ struct bio_dgram_sctp_prinfo { # define BIO_BIND_REUSEADDR_IF_UNUSED BIO_SOCK_REUSEADDR # define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL) # define BIO_get_bind_mode(b) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL) - -/* BIO_s_accept() and BIO_s_connect() */ -# define BIO_do_connect(b) BIO_do_handshake(b) -# define BIO_do_accept(b) BIO_do_handshake(b) # endif /* OPENSSL_NO_SOCK */ +# define BIO_do_connect(b) BIO_do_handshake(b) +# define BIO_do_accept(b) BIO_do_handshake(b) + # define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL) /* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */