From 48b8c1187647b71412922bd1f2780cb1811badba Mon Sep 17 00:00:00 2001 From: Alex Arslan Date: Sat, 14 Apr 2018 10:41:01 -0700 Subject: [PATCH] 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 Reviewed-By: Colin Ihrig Reviewed-By: Santiago Gimeno --- src/unix/tcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/unix/tcp.c b/src/unix/tcp.c index 336d8e29..9a46793f 100644 --- a/src/unix/tcp.c +++ b/src/unix/tcp.c @@ -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;