summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-07-01 12:44:00 +0100
committerDr. Stephen Henson <steve@openssl.org>2014-07-01 12:44:00 +0100
commit9cd86abb51c2cc76fcb33080620f319bd5fcb47d (patch)
tree83e26c6404132788b161f4a26ee32f40f19eab7b
parent387b844ffdc79b733be0b1dbaddd2ac64a6c1192 (diff)
downloadopenssl-new-9cd86abb51c2cc76fcb33080620f319bd5fcb47d.tar.gz
Make NO_SYS_UN_H compile.
-rw-r--r--apps/s_client.c5
-rw-r--r--apps/s_server.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/apps/s_client.c b/apps/s_client.c
index de6a984feb..2155b055cc 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -1511,9 +1511,12 @@ bad:
#endif
re_start:
-
+#ifdef NO_SYS_UN_H
+ if (init_client(&s,host,port,socket_type) == 0)
+#else
if ((!unix_path && (init_client(&s,host,port,socket_type) == 0)) ||
(unix_path && (init_client_unix(&s,unix_path) == 0)))
+#endif
{
BIO_printf(bio_err,"connect:errno=%d\n",get_last_socket_error());
SHUTDOWN(s);
diff --git a/apps/s_server.c b/apps/s_server.c
index f890aac5b5..6dabdf4f40 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -1012,7 +1012,9 @@ int MAIN(int argc, char *argv[])
int badarg = 0;
short port=PORT;
const char *unix_path=NULL;
+#ifndef NO_SYS_UN_H
int unlink_unix_path=0;
+#endif
int (*server_cb)(char *hostname, int s, int stype, unsigned char *context);
char *CApath=NULL,*CAfile=NULL;
char *chCApath=NULL,*chCAfile=NULL;
@@ -2141,6 +2143,7 @@ bad:
server_cb = www_body;
else
server_cb = sv_body;
+#ifndef NO_SYS_UN_H
if (unix_path)
{
if (unlink_unix_path)
@@ -2148,6 +2151,7 @@ bad:
do_server_unix(unix_path,&accept_socket,server_cb, context, naccept);
}
else
+#endif
do_server(port,socket_type,&accept_socket,server_cb, context, naccept);
print_stats(bio_s_out,ctx);
ret=0;