Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2018-06-26 17:31:17 +0300
committerCorinna Vinschen <corinna@vinschen.de>2018-06-26 17:31:17 +0300
commit6c55be9dbbd724edc5fd5b6c022e212f42754887 (patch)
treec004ebcd6e05340d609e7ba330a22a506db6e769 /winsup/cygwin/net.cc
parent17918cc6a6e6471162177a1125c6208ecce8a72e (diff)
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 <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r--winsup/cygwin/net.cc8
1 files changed, 8 insertions, 0 deletions
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);