From 7f7532fafb0e9787bc9c789f14e9344b8da16244 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 23 Feb 2018 20:59:21 +0100 Subject: Cygwin: Create empty fhandler_socket_unix * Make distinct from AF_LOCAL for testing purposes. This will have to be reverted as soon as fhandler_socket_unix goes life. * Move saw_reuseaddr flag back to fhandler_socket status Signed-off-by: Corinna Vinschen --- winsup/cygwin/net.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/net.cc') diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index fe6576dc9..89945c5a1 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -516,6 +516,7 @@ cygwin_socket (int af, int type, int protocol) switch (af) { case AF_LOCAL: + case AF_UNIX: if (type != SOCK_STREAM && type != SOCK_DGRAM) { set_errno (EINVAL); @@ -526,7 +527,7 @@ cygwin_socket (int af, int type, int protocol) set_errno (EPROTONOSUPPORT); goto done; } - dev = af_local_dev; + dev = (af == AF_LOCAL) ? af_local_dev : af_unix_dev; break; case AF_INET: case AF_INET6: @@ -2312,6 +2313,7 @@ socketpair (int af, int type, int protocol, int *sb) switch (af) { case AF_LOCAL: + case AF_UNIX: if (type != SOCK_STREAM && type != SOCK_DGRAM) { set_errno (EINVAL); @@ -2322,7 +2324,7 @@ socketpair (int af, int type, int protocol, int *sb) set_errno (EPROTONOSUPPORT); goto done; } - dev = af_local_dev; + dev = (af == AF_LOCAL) ? af_local_dev : af_unix_dev; break; default: set_errno (EAFNOSUPPORT); -- cgit v1.2.3