OpenBSD IPv6 sockets are always IPv6-only, so the socket option is read-only (not modifiable)
void
isc_socket_ipv6only(isc_socket_t *sock, bool yes) {
-#if defined(IPV6_V6ONLY)
+#if defined(IPV6_V6ONLY) && !defined(__OpenBSD__)
int onoff = yes ? 1 : 0;
#else /* if defined(IPV6_V6ONLY) */
UNUSED(yes);
REQUIRE(VALID_SOCKET(sock));
INSIST(!sock->dupped);
-#ifdef IPV6_V6ONLY
+#if defined(IPV6_V6ONLY) && !defined(__OpenBSD__)
if (sock->pf == AF_INET6) {
if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY,
(void *)&onoff, sizeof(int)) < 0)