cf-socket: move ctx declaration under HAVE_GETPEERNAME

Closes #11352
This commit is contained in:
humbleacolyte 2023-06-20 17:02:21 +05:00 committed by Daniel Stenberg
parent 93b8be802a
commit 51f6a0dc1a
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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 */