diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2018-02-23 22:59:21 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2018-02-23 23:00:43 +0300 |
commit | 7f7532fafb0e9787bc9c789f14e9344b8da16244 (patch) | |
tree | c05b59ace7c6f4c0895269aea45002e3375da178 /winsup/cygwin/net.cc | |
parent | 5acadbe8afda9ccb97829b9a8f5813464519fcae (diff) |
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 <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r-- | winsup/cygwin/net.cc | 6 |
1 files changed, 4 insertions, 2 deletions
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); |