* net.cc (cygwin_socket): Set protocol to 0 when address family is

AF_UNIX to avoid WSAEPROTONOSUPPORT error.
This commit is contained in:
Corinna Vinschen 2001-03-17 17:13:52 +00:00
parent f52488f76b
commit 298fad4623
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Sat Mar 17 18:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_socket): Set protocol to 0 when address family is
AF_UNIX to avoid WSAEPROTONOSUPPORT error.
Sat Mar 17 09:51:32 2001 Mathew Brozowski <brozow@tavve.com>
* net.cc (cygwin_socket): Pass protocol parameter to socket call.

View File

@ -352,7 +352,7 @@ cygwin_socket (int af, int type, int protocol)
{
debug_printf ("socket (%d, %d, %d)", af, type, protocol);
soc = socket (AF_INET, type, protocol);
soc = socket (AF_INET, type, af == AF_UNIX ? 0 : protocol);
if (soc == INVALID_SOCKET)
{