From c195c882335874505f58debf3f6bf750377c62af Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 1 Dec 2020 15:19:56 +0000 Subject: [PATCH] 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) --- include/openssl/bio.h.in | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/openssl/bio.h.in b/include/openssl/bio.h.in index d7380d47e9..d52392def8 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() */ -- GitLab