From 51f6a0dc1af2d597566d597695da54098b8e6119 Mon Sep 17 00:00:00 2001 From: humbleacolyte Date: Tue, 20 Jun 2023 17:02:21 +0500 Subject: [PATCH] cf-socket: move ctx declaration under HAVE_GETPEERNAME Closes #11352 --- lib/cf-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */