From be1ef74ba2928b86e4b4dc876bf1857f40cd7ac5 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 29 Jun 2014 10:04:07 +0200 Subject: [PATCH] libfetch: merge NetBSD's common.c 1.29 too to reduce differences and fix a warning. --- lib/fetch/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fetch/common.c b/lib/fetch/common.c index 7764b270..e34cacc5 100644 --- a/lib/fetch/common.c +++ b/lib/fetch/common.c @@ -462,8 +462,8 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) fprintf(stderr, "SSL_set_fd failed\n"); return (-1); } -#ifndef OPENSSL_NO_TLSEXT - if (!SSL_set_tlsext_host_name(conn->ssl, URL->host)) { +#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) + if (!SSL_set_tlsext_host_name(conn->ssl, (char *)(uintptr_t)URL->host)) { fprintf(stderr, "TLS server name indication extension failed for host %s\n", URL->host);