$OpenBSD: patch-SWIG__bio_i,v 1.4 2018/04/25 16:51:05 jasper Exp $

BIO_meth_new() and BIO_meth_free() are non-static in LibreSSL

Index: SWIG/_bio.i
--- SWIG/_bio.i.orig
+++ SWIG/_bio.i
@@ -293,8 +293,12 @@ int bio_should_write(BIO* a) {
 }
 
 /* Macros for things not defined before 1.1.0 */
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
-static BIO_METHOD *
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+
+#if !defined(LIBRESSL_VERSION_NUMBER)
+static
+#endif
+BIO_METHOD *
 BIO_meth_new( int type, const char *name )
 {
     BIO_METHOD *method = malloc( sizeof(BIO_METHOD) );
@@ -306,7 +310,10 @@ BIO_meth_new( int type, const char *name )
     return method;
 }
 
-static void
+#if !defined(LIBRESSL_VERSION_NUMBER)
+static
+#endif
+void
 BIO_meth_free( BIO_METHOD *meth )
 {
     if ( meth == NULL ) {
