tls: fix compilation when both gnutls and openssl are enabled

Message ID 1432276849-89533-1-git-send-email-martin@martin.st
State Committed
Commit 29216d7fd14d1cec16821867d17c90b5c49e8c07
Headers show

Commit Message

Martin Storsjö May 22, 2015, 6:40 a.m.
From: James Almer <jamrial@gmail.com>

---
While such a configuration probably doesn't make much sense, we
shouldn't fail to compile there.
---
 libavformat/tls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

wm4 May 22, 2015, 9:17 a.m. | #1
On Fri, 22 May 2015 09:40:49 +0300
Martin Storsjö <martin@martin.st> wrote:

> From: James Almer <jamrial@gmail.com>
> 
> ---
> While such a configuration probably doesn't make much sense, we
> shouldn't fail to compile there.
> ---
>  libavformat/tls.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/tls.c b/libavformat/tls.c
> index 7ce9817..00fe876 100644
> --- a/libavformat/tls.c
> +++ b/libavformat/tls.c
> @@ -213,7 +213,7 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
>      struct addrinfo hints = { 0 }, *ai = NULL;
>      const char *proxy_path;
>      int use_proxy;
> -#if CONFIG_OPENSSL
> +#if CONFIG_OPENSSL && !CONFIG_GNUTLS
>      BIO *bio;
>  #endif
>  

Looks good to me. Would be nice if this could be applied quickly.
Luca Barbato May 22, 2015, 10:04 a.m. | #2
On 22/05/15 08:40, Martin Storsjö wrote:
> From: James Almer <jamrial@gmail.com>
> 
> ---
> While such a configuration probably doesn't make much sense, we
> shouldn't fail to compile there.
> ---
>  libavformat/tls.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Configure should pick one provider and just one IMHO.

lu

Patch

diff --git a/libavformat/tls.c b/libavformat/tls.c
index 7ce9817..00fe876 100644
--- a/libavformat/tls.c
+++ b/libavformat/tls.c
@@ -213,7 +213,7 @@  static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
     struct addrinfo hints = { 0 }, *ai = NULL;
     const char *proxy_path;
     int use_proxy;
-#if CONFIG_OPENSSL
+#if CONFIG_OPENSSL && !CONFIG_GNUTLS
     BIO *bio;
 #endif