From 507b85de51abf377edb94ac557c28c7ab66d3d22 Mon Sep 17 00:00:00 2001 From: Fabrizio Bertocci Date: Sat, 13 Mar 2021 14:29:30 -0500 Subject: [PATCH] Updated the implementation of socketpair for Windows with AF_UNIX to call either the _dgram od _stream version of socketpair() --- libc/sock/socketpair.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libc/sock/socketpair.c b/libc/sock/socketpair.c index 41d8aad62..813f95ee9 100644 --- a/libc/sock/socketpair.c +++ b/libc/sock/socketpair.c @@ -60,7 +60,9 @@ int socketpair(int family, int type, int protocol, int sv[2]) { * works with type==SOCK_STREAM and not with * SOCK_DGRAM (as well as SOCK_SEQPACKET) */ - return sys_socketpair_nt_stream(AF_INET, SOCK_STREAM, 0, sv); + + /* Force to build an AF_INET socketpair */ + family = AF_INET; /* errno = EAFNOSUPPORT; return -1;