From 7f68245eae59fdd26ddd94d26287354a88ac8511 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 13 Mar 2024 17:46:36 +0600 Subject: [PATCH] unix_netsocket.c: Fix comparison value --- src/unix/unix_netsocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/unix_netsocket.c b/src/unix/unix_netsocket.c index 9e9ac2f49..e6ec6285f 100644 --- a/src/unix/unix_netsocket.c +++ b/src/unix/unix_netsocket.c @@ -144,7 +144,7 @@ int plat_netsocket_connect(SOCKET socket, const char* hostname, unsigned short p sock_addr.sin_addr.s_addr = inet_addr(hostname); sock_addr.sin_port = htons(port); - if (sock_addr.sin_addr.s_addr == INADDR_ANY || sock_addr.sin_addr.s_addr == 0) { + if (sock_addr.sin_addr.s_addr == ((in_addr_t)-1) || sock_addr.sin_addr.s_addr == 0) { struct hostent *hp; hp = gethostbyname(hostname);