From 46205c6cfff0e683ca0ef14fae67e8b8e53987da Mon Sep 17 00:00:00 2001 From: Logan oos Even <46396513+Logan007@users.noreply.github.com> Date: Mon, 13 Sep 2021 14:40:28 +0545 Subject: [PATCH] added type cast to socket handling --- src/n2n.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/n2n.c b/src/n2n.c index 54055cf..e705c64 100644 --- a/src/n2n.c +++ b/src/n2n.c @@ -87,7 +87,7 @@ int detect_local_ip_address (n2n_sock_t* out_sock, const n2n_edge_t* eee) { // we cannot do it with the real (eee->sock) socket because socket does not accept any conenction from elsewhere then, // e.g. from another edge instead of the supernode; as re-connecting to AF_UNSPEC might not work to release the socket // on non-UNIXoids, we use a temporary socket - if(probe_sock >= 0) { + if((int)probe_sock >= 0) { fill_sockaddr((struct sockaddr*)&sn_sock, sizeof(sn_sock), &eee->curr_sn->sock); if(connect(probe_sock, (struct sockaddr *)&sn_sock, sizeof(sn_sock)) == 0) { if((getsockname(probe_sock, (struct sockaddr *)&local_sock, &sock_len) == 0)