From patchwork Fri Oct 28 07:47:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Forney X-Patchwork-Id: 1212 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.133 with SMTP id o127csp964637vsd; Fri, 28 Oct 2016 00:48:31 -0700 (PDT) X-Received: by 10.194.55.170 with SMTP id t10mr10359385wjp.187.1477640911096; Fri, 28 Oct 2016 00:48:31 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b128si8448132wme.106.2016.10.28.00.48.30; Fri, 28 Oct 2016 00:48:31 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@mforney-org.20150623.gappssmtp.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F0E80689F79; Fri, 28 Oct 2016 10:48:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 85F41689F65 for ; Fri, 28 Oct 2016 10:48:18 +0300 (EEST) Received: by mail-pf0-f195.google.com with SMTP id n85so525316pfi.3 for ; Fri, 28 Oct 2016 00:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=0HRWo7GPXT4z3ZaNZqCb+6yM9z15zuosJ+7adeozOkM=; b=M2IK72yQCrNXcM0vxJToaRNJx0s2FJCEY9sTqK3IZHdvk9L0lwTzFncdYea+L3572E U0Ogspv0LDjxjcUJCmb3qxU5qNGWuqyaPYJNfkxXgl+fDIRk58Ia+FUPFjCrNhP1H/HX 1MPf+Z0WgrWNrjHzaPiUkSL9IMweWTbMzsZoEPj+F+X8TgBNKbReaMUweKSkLBXIjORy Tk7Er3k4ZTlkr3pfp/UY0JvGJakJggo2qM65hsVx9fHwE+hWbslaG2Leak8iI/KhwYg3 ExJq9jeH0XO+h82CPCza65p/IiGJkbWwxAOJFbyoxOOfdUvsddV5DyFw9sy9vRncOF+i 1Vug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=0HRWo7GPXT4z3ZaNZqCb+6yM9z15zuosJ+7adeozOkM=; b=BwrIdu6j5fxytLssDj7vBjli0SD61kk09pzhLbqCCVJ6ORfvOuLs0pBKELnjPDJ8hK aq+u85pN4NxhcCxfXsRIeKVkvN2jU1cWRUx02yQqarxa/ZvlF703TBDsJlshIoTISZyB 7BPsa93V1/EBTD/gobxfDqejweRjITWc65CkadGO0YgypQnAOq2A6he/kWs5Or+dH1sU /zW1XVA2B2cmDWyAOdiAipVP9JAZZGCMkchQQdvJEgDi6CQkfMsNOMHb15j3Bo2IWXSs Yqt0/KaFR4q+KP0tgxtceC7oJ7zlKHGxD9jfU+5qJXNtT4y83d+j+nG2ASpTKG4g/w3b Vk9w== X-Gm-Message-State: ABUngvddoQHV9CroNio9r1WVClLyq0SmGQd+JfynAmjMc/SUmCPKiyOXwwqY1dhl7Byu6w== X-Received: by 10.99.176.7 with SMTP id h7mr6272836pgf.170.1477640899899; Fri, 28 Oct 2016 00:48:19 -0700 (PDT) Received: from localhost ([2601:647:5100:4a0:16dd:a9ff:fee7:6b79]) by smtp.gmail.com with ESMTPSA id e7sm16619439pfa.65.2016.10.28.00.48.19 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Oct 2016 00:48:19 -0700 (PDT) From: Michael Forney To: ffmpeg-devel@ffmpeg.org Date: Fri, 28 Oct 2016 00:47:08 -0700 Message-Id: <1477640828-2738-1-git-send-email-mforney@mforney.org> X-Mailer: git-send-email 2.6.2 Subject: [FFmpeg-devel] [PATCH] Fix build with LibreSSL X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Forney --- libavformat/tls_openssl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index c551ac7..9712856 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -43,7 +43,7 @@ typedef struct TLSContext { TLSShared tls_shared; SSL_CTX *ctx; SSL *ssl; -#if OPENSSL_VERSION_NUMBER >= 0x1010000fL +#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER) BIO_METHOD* url_bio_method; #endif } TLSContext; @@ -68,7 +68,7 @@ static unsigned long openssl_thread_id(void) static int url_bio_create(BIO *b) { -#if OPENSSL_VERSION_NUMBER >= 0x1010000fL +#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER) BIO_set_init(b, 1); BIO_set_data(b, NULL); BIO_set_flags(b, 0); @@ -85,7 +85,7 @@ static int url_bio_destroy(BIO *b) return 1; } -#if OPENSSL_VERSION_NUMBER >= 0x1010000fL +#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER) #define GET_BIO_DATA(x) BIO_get_data(x); #else #define GET_BIO_DATA(x) (x)->ptr; @@ -133,7 +133,7 @@ static int url_bio_bputs(BIO *b, const char *str) return url_bio_bwrite(b, str, strlen(str)); } -#if OPENSSL_VERSION_NUMBER < 0x1010000fL +#if OPENSSL_VERSION_NUMBER < 0x1010000fL || defined(LIBRESSL_VERSION_NUMBER) static BIO_METHOD url_bio_method = { .type = BIO_TYPE_SOURCE_SINK, .name = "urlprotocol bio", @@ -212,7 +212,7 @@ static int tls_close(URLContext *h) SSL_CTX_free(c->ctx); if (c->tls_shared.tcp) ffurl_close(c->tls_shared.tcp); -#if OPENSSL_VERSION_NUMBER >= 0x1010000fL +#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER) if (c->url_bio_method) BIO_meth_free(c->url_bio_method); #endif @@ -265,7 +265,7 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op ret = AVERROR(EIO); goto fail; } -#if OPENSSL_VERSION_NUMBER >= 0x1010000fL +#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER) p->url_bio_method = BIO_meth_new(BIO_TYPE_SOURCE_SINK, "urlprotocol bio"); BIO_meth_set_write(p->url_bio_method, url_bio_bwrite); BIO_meth_set_read(p->url_bio_method, url_bio_bread);