$OpenBSD: patch-crypto_bio_b_sock2_c,v 1.3 2020/12/03 11:58:48 sthen Exp $

On OpenBSD, setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, ...) only allows
setting to 1 (which is the default anyway). Setting to 0 results in EINVAL.

Index: crypto/bio/b_sock2.c
--- crypto/bio/b_sock2.c.orig
+++ crypto/bio/b_sock2.c
@@ -243,7 +243,7 @@ int BIO_listen(int sock, const BIO_ADDR *addr, int opt
         }
     }
 
-# ifdef IPV6_V6ONLY
+# if defined (IPV6_V6ONLY) && !defined(__OpenBSD__)
     if (BIO_ADDR_family(addr) == AF_INET6) {
         /*
          * Note: Windows default of IPV6_V6ONLY is ON, and Linux is OFF.
