From d545eb9bb412901138b0573399fb9fc5815311e1 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 16 Sep 2020 15:01:10 +0800 Subject: [PATCH] [td-225] fix compiler error in win platform --- src/util/src/tsocket.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util/src/tsocket.c b/src/util/src/tsocket.c index 479eeaa754..4cf73e6dff 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; } } -- GitLab