unbreak again; we now have all the BIO_* that libgit2 uses apart from BIO_get_new_index()

This commit is contained in:
sthen 2018-02-18 19:37:56 +00:00
parent 24f62d13dc
commit b332d91e9e

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-src_openssl_stream_h,v 1.5 2018/02/17 21:09:40 sthen Exp $
$OpenBSD: patch-src_openssl_stream_h,v 1.6 2018/02/18 19:37:56 sthen Exp $
Index: src/openssl_stream.h
--- src/openssl_stream.h.orig
@ -11,23 +11,7 @@ Index: src/openssl_stream.h
GIT_INLINE(BIO_METHOD*) BIO_meth_new(int type, const char *name)
{
BIO_METHOD *meth = git__calloc(1, sizeof(BIO_METHOD));
@@ -64,6 +65,7 @@ GIT_INLINE(int) BIO_meth_set_puts(BIO_METHOD *biom, in
biom->bputs = puts;
return 1;
}
+#endif
GIT_INLINE(int) BIO_meth_set_gets(BIO_METHOD *biom, int (*gets) (BIO *, char *, int))
@@ -72,6 +74,7 @@ GIT_INLINE(int) BIO_meth_set_gets(BIO_METHOD *biom, in
return 1;
}
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL
GIT_INLINE(int) BIO_meth_set_ctrl(BIO_METHOD *biom, long (*ctrl) (BIO *, int, long, void *))
{
biom->ctrl = ctrl;
@@ -89,6 +92,7 @@ GIT_INLINE(int) BIO_meth_set_destroy(BIO_METHOD *biom,
@@ -89,6 +90,7 @@ GIT_INLINE(int) BIO_meth_set_destroy(BIO_METHOD *biom,
biom->destroy = destroy;
return 1;
}
@ -35,12 +19,15 @@ Index: src/openssl_stream.h
GIT_INLINE(int) BIO_get_new_index(void)
{
@@ -111,10 +115,12 @@ GIT_INLINE(void*) BIO_get_data(BIO *a)
return a->ptr;
@@ -96,6 +98,7 @@ GIT_INLINE(int) BIO_get_new_index(void)
return 0;
}
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL
GIT_INLINE(const unsigned char *) ASN1_STRING_get0_data(const ASN1_STRING *x)
GIT_INLINE(void) BIO_set_init(BIO *b, int init)
{
b->init = init;
@@ -115,6 +118,7 @@ GIT_INLINE(const unsigned char *) ASN1_STRING_get0_dat
{
return ASN1_STRING_data((ASN1_STRING *)x);
}