Commit fc83de7e authored by Clément Bœsch's avatar Clément Bœsch

Merge commit 'ee050797'

* commit 'ee050797':
  openssl: Support version 1.1.0.

This commit is mostly a noop, see 798c6ecc

Included the simplifications by Martin Storsjö and fixed the
GET_BIO_DATA() macro to prevent a warning after the simplifications.
Merged-by: 's avatarClément Bœsch <u@pkh.me>
parents 2c47d243 ee050797
......@@ -86,17 +86,15 @@ static int url_bio_destroy(BIO *b)
}
#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
#define GET_BIO_DATA(x) BIO_get_data(x);
#define GET_BIO_DATA(x) BIO_get_data(x)
#else
#define GET_BIO_DATA(x) (x)->ptr;
#define GET_BIO_DATA(x) (x)->ptr
#endif
static int url_bio_bread(BIO *b, char *buf, int len)
{
URLContext *h;
int ret;
h = GET_BIO_DATA(b);
ret = ffurl_read(h, buf, len);
URLContext *h = GET_BIO_DATA(b);
int ret = ffurl_read(h, buf, len);
if (ret >= 0)
return ret;
BIO_clear_retry_flags(b);
......@@ -107,10 +105,8 @@ static int url_bio_bread(BIO *b, char *buf, int len)
static int url_bio_bwrite(BIO *b, const char *buf, int len)
{
URLContext *h;
int ret;
h = GET_BIO_DATA(b);
ret = ffurl_write(h, buf, len);
URLContext *h = GET_BIO_DATA(b);
int ret = ffurl_write(h, buf, len);
if (ret >= 0)
return ret;
BIO_clear_retry_flags(b);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment