tcp,openbsd: disable Unix TCP check for IPV6_ONLY

OpenBSD does not support setting IPV6_ONLY to anything but 1; OpenBSD
does not support IPv4-mapped IPv6 addresses.

Upstreamed from OpenBSD Ports Collection.

PR-URL: https://github.com/libuv/libuv/pull/1797
Reviewed-By: Aaron Bieber <deftly@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit is contained in:
Alex Arslan 2018-04-14 10:41:01 -07:00 committed by Santiago Gimeno
parent fbd6de31be
commit 48b8c11876
No known key found for this signature in database
GPG Key ID: F28C3C8DA33C03BE

View File

@ -164,6 +164,7 @@ int uv__tcp_bind(uv_tcp_t* tcp,
if (setsockopt(tcp->io_watcher.fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)))
return UV__ERR(errno);
#ifndef __OpenBSD__
#ifdef IPV6_V6ONLY
if (addr->sa_family == AF_INET6) {
on = (flags & UV_TCP_IPV6ONLY) != 0;
@ -179,6 +180,7 @@ int uv__tcp_bind(uv_tcp_t* tcp,
return UV__ERR(errno);
}
}
#endif
#endif
errno = 0;