Some mingws have AF_UNIX, which may have prevented our socketpair from working at all on them. Fix that.

svn:r1098
This commit is contained in:
Nick Mathewson 2009-02-02 21:59:53 +00:00
parent 3502a472b5
commit 722885fba9

View File

@ -95,10 +95,11 @@ evutil_socketpair(int family, int type, int protocol, evutil_socket_t fd[2])
int saved_errno = -1; int saved_errno = -1;
if (protocol if (protocol
|| (family != AF_INET
#ifdef AF_UNIX #ifdef AF_UNIX
|| family != AF_UNIX && family != AF_UNIX
#endif #endif
) { )) {
EVUTIL_SET_SOCKET_ERROR(WSAEAFNOSUPPORT); EVUTIL_SET_SOCKET_ERROR(WSAEAFNOSUPPORT);
return -1; return -1;
} }