$OpenBSD: patch-include_haproxy_openssl-compat_h,v 1.2 2021/12/16 21:48:17 danj Exp $

Committed upstream
https://github.com/haproxy/haproxy/commit/d1a2e2b0d1da0dff726738343fbaed044fb93470

Index: include/haproxy/openssl-compat.h
--- include/haproxy/openssl-compat.h.orig
+++ include/haproxy/openssl-compat.h
@@ -386,7 +386,7 @@ static inline void SSL_CTX_up_ref(SSL_CTX *ctx)
 #define SSL_CTX_get_extra_chain_certs(ctx, chain) do { *(chain) = (ctx)->extra_certs; } while (0)
 #endif
 
-#if HA_OPENSSL_VERSION_NUMBER < 0x10100000L
+#if HA_OPENSSL_VERSION_NUMBER < 0x10100000L && (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL)
 #define BIO_get_data(b)            (b)->ptr
 #define BIO_set_data(b, v)         do { (b)->ptr  = (v); } while (0)
 #define BIO_set_init(b, v)         do { (b)->init = (v); } while (0)
