From: Daniel Stenberg Date: Thu, 6 Apr 2023 14:34:21 +0000 (+0200) Subject: vtls: fix build error when proxy-disabled X-Git-Tag: curl-8_1_0~211 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ba120e307ec6fbc6cd292904092bb62ce3ebe31;p=thirdparty%2Fcurl.git vtls: fix build error when proxy-disabled Closes #10901 --- diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c index 8b6a7bf0cf..1fa05dca39 100644 --- a/lib/vtls/vtls.c +++ b/lib/vtls/vtls.c @@ -2034,12 +2034,18 @@ CURLcode Curl_alpn_set_negotiated(struct Curl_cfilter *cf, size_t proto_len) { int can_multi = 0; - unsigned char *palpn = Curl_ssl_cf_is_proxy(cf)? - &cf->conn->proxy_alpn : &cf->conn->alpn; + unsigned char *palpn = +#ifndef CURL_DISABLE_PROXY + Curl_ssl_cf_is_proxy(cf)? + &cf->conn->proxy_alpn : &cf->conn->alpn +#else + &cf->conn->alpn +#endif + ; if(proto && proto_len) { if(proto_len == ALPN_HTTP_1_1_LENGTH && - !memcmp(ALPN_HTTP_1_1, proto, ALPN_HTTP_1_1_LENGTH)) { + !memcmp(ALPN_HTTP_1_1, proto, ALPN_HTTP_1_1_LENGTH)) { *palpn = CURL_HTTP_VERSION_1_1; } else if(proto_len == ALPN_HTTP_1_0_LENGTH && @@ -2055,7 +2061,7 @@ CURLcode Curl_alpn_set_negotiated(struct Curl_cfilter *cf, #endif #ifdef USE_HTTP3 else if(proto_len == ALPN_H3_LENGTH && - !memcmp(ALPN_H3, proto, ALPN_H3_LENGTH)) { + !memcmp(ALPN_H3, proto, ALPN_H3_LENGTH)) { *palpn = CURL_HTTP_VERSION_3; can_multi = 1; }