summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2012-04-16 17:42:36 +0000
committerAndy Polyakov <appro@openssl.org>2012-04-16 17:42:36 +0000
commit4a1fbd13ee2a15b6db2e795a57528509c52355bf (patch)
tree42aed5452bf00b57ea539f7028be03e9c27cadd3
parent9eba5614fe7ae0901fe23aa1b2d147376ca67778 (diff)
OPENSSL_NO_SOCK fixes.
PR: 2791 Submitted by: Ben Noordhuis
-rw-r--r--crypto/bio/b_sock.c2
-rw-r--r--ssl/bio_ssl.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index d47310d650..41f958be71 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -960,7 +960,6 @@ int BIO_set_tcp_ndelay(int s, int on)
#endif
return(ret == 0);
}
-#endif
int BIO_socket_nbio(int s, int mode)
{
@@ -973,3 +972,4 @@ int BIO_socket_nbio(int s, int mode)
#endif
return(ret == 0);
}
+#endif
diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c
index eedac8a3fc..e9552caee2 100644
--- a/ssl/bio_ssl.c
+++ b/ssl/bio_ssl.c
@@ -538,6 +538,7 @@ err:
BIO *BIO_new_ssl_connect(SSL_CTX *ctx)
{
+#ifndef OPENSSL_NO_SOCK
BIO *ret=NULL,*con=NULL,*ssl=NULL;
if ((con=BIO_new(BIO_s_connect())) == NULL)
@@ -549,6 +550,7 @@ BIO *BIO_new_ssl_connect(SSL_CTX *ctx)
return(ret);
err:
if (con != NULL) BIO_free(con);
+#endif
return(NULL);
}