From: humbleacolyte Date: Tue, 20 Jun 2023 12:02:21 +0000 (+0500) Subject: cf-socket: move ctx declaration under HAVE_GETPEERNAME X-Git-Tag: curl-8_2_0~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51f6a0dc1af2d597566d597695da54098b8e6119;p=thirdparty%2Fcurl.git cf-socket: move ctx declaration under HAVE_GETPEERNAME Closes #11352 --- diff --git a/lib/cf-socket.c b/lib/cf-socket.c index 3707b2c659..0be685216c 100644 --- a/lib/cf-socket.c +++ b/lib/cf-socket.c @@ -1360,8 +1360,8 @@ out: static void conn_set_primary_ip(struct Curl_cfilter *cf, struct Curl_easy *data) { - struct cf_socket_ctx *ctx = cf->ctx; #ifdef HAVE_GETPEERNAME + struct cf_socket_ctx *ctx = cf->ctx; if(!(data->conn->handler->protocol & CURLPROTO_TFTP)) { /* TFTP does not connect the endpoint: getpeername() failed with errno 107: Transport endpoint is not connected */