fixed compilation with libressl2.7 (patch from sss, modified)

This commit is contained in:
csoler 2018-09-05 21:00:34 +02:00
parent 703d709624
commit 4a309b827a
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -91,13 +91,19 @@ static int clear_tou_socket_error(int s);
#include "tou.h" #include "tou.h"
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
//static void BIO_set_shutdown(BIO *a,int s) { a->shutdown=s; }
static int BIO_get_init(BIO *a) { return a->init; }
#if (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000) || (!defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10100000L)
static int BIO_get_shutdown(BIO *a) { return a->shutdown; } static int BIO_get_shutdown(BIO *a) { return a->shutdown; }
static int BIO_get_init(BIO *a) { return a->init; }
static void BIO_set_init(BIO *a,int i) { a->init=i; } static void BIO_set_init(BIO *a,int i) { a->init=i; }
static void BIO_set_data(BIO *a,void *p) { a->ptr = p; } static void BIO_set_data(BIO *a,void *p) { a->ptr = p; }
#endif
#else #else
typedef struct bio_method_st { typedef struct bio_method_st {
int type; int type;
const char *name; const char *name;