Allow AF_UNSPEC family in socketpair(2).

This commit is contained in:
Jonas 'Sortie' Termansen 2017-06-25 23:12:59 +02:00
parent 3d356af8d2
commit b0496023a1
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Jonas 'Sortie' Termansen.
* Copyright (c) 2016, 2017 Jonas 'Sortie' Termansen.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@ -131,7 +131,7 @@ static int socketpair_unix_stream(int flags, int fds[2])
int socketpair(int family, int type, int protocol, int fds[2])
{
if ( family == AF_UNIX )
if ( family == AF_UNSPEC || family == AF_UNIX )
{
if ( protocol != 0 )
return errno = EPROTONOSUPPORT, -1;