diff --git a/src/util/src/tsocket.c b/src/util/src/tsocket.c index 479eeaa7544f20178f27623faa04e2d3079d0b10..4cf73e6dff8aa534e87145a3e1cb04e48d759c65 100644 --- a/src/util/src/tsocket.c +++ b/src/util/src/tsocket.c @@ -56,13 +56,16 @@ uint32_t taosGetIpFromFqdn(const char *fqdn) { freeaddrinfo(result); return ip; } else { +#ifdef EAI_SYSTEM if (ret == EAI_SYSTEM) { uError("failed to get the ip address, fqdn:%s, code:%d, reason:%s", fqdn, ret, strerror(errno)); terrno = TAOS_SYSTEM_ERROR(errno); } else { uError("failed to get the ip address, fqdn:%s, code:%d, reason:%s", fqdn, ret, gai_strerror(ret)); } - +#else + uError("failed to get the ip address, fqdn:%s, code:%d, reason:%s", fqdn, ret, gai_strerror(ret)); +#endif return 0xFFFFFFFF; } }