From 6c55be9dbbd724edc5fd5b6c022e212f42754887 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 26 Jun 2018 16:31:17 +0200 Subject: Cygwin: Allow to build without experimental AF_UNIX code by default Introduce __WITH_AF_UNIX preprocessor flag to enable the new code Signed-off-by: Corinna Vinschen --- winsup/cygwin/net.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'winsup/cygwin/net.cc') diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 67cd96755..d152894ee 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -500,8 +500,12 @@ cygwin_socket (int af, int type, int protocol) switch (af) { case AF_LOCAL: +#ifndef __WITH_AF_UNIX + dev = af_local_dev; +#else case AF_UNIX: dev = (af == AF_LOCAL) ? af_local_dev : af_unix_dev; +#endif /* __WITH_AF_UNIX */ break; case AF_INET: case AF_INET6: @@ -2285,8 +2289,12 @@ socketpair (int af, int type, int protocol, int sv[2]) switch (af) { case AF_LOCAL: +#ifndef __WITH_AF_UNIX + dev = af_local_dev; +#else case AF_UNIX: dev = (af == AF_LOCAL) ? af_local_dev : af_unix_dev; +#endif /* __WITH_AF_UNIX */ break; default: set_errno (EAFNOSUPPORT); -- cgit v1.2.3