PF_UNIX is not a valid protocol for socketpair

OpenBSD accept it, but FreeBSD disallows it.  PF_UNSPEC (or 0) should
be used instead.  The FastCGI bit in the regress suite still doesn't
work on FreeBSD, but at least now it starts.
This commit is contained in:
Omar Polo 2021-07-08 10:09:24 +00:00
parent e7c6502bf3
commit 2e2e189b01
1 changed files with 1 additions and 1 deletions

2
ex.c
View File

@ -319,7 +319,7 @@ fcgi_open_prog(struct fcgi *f)
/* XXX! */
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNIX, s) == -1)
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, s) == -1)
err(1, "socketpair");
switch (p = fork()) {