提交 d545eb9b 编写于 作者: H Haojun Liao

[td-225] fix compiler error in win platform

上级 b002f0be
...@@ -56,13 +56,16 @@ uint32_t taosGetIpFromFqdn(const char *fqdn) { ...@@ -56,13 +56,16 @@ uint32_t taosGetIpFromFqdn(const char *fqdn) {
freeaddrinfo(result); freeaddrinfo(result);
return ip; return ip;
} else { } else {
#ifdef EAI_SYSTEM
if (ret == EAI_SYSTEM) { if (ret == EAI_SYSTEM) {
uError("failed to get the ip address, fqdn:%s, code:%d, reason:%s", fqdn, ret, strerror(errno)); uError("failed to get the ip address, fqdn:%s, code:%d, reason:%s", fqdn, ret, strerror(errno));
terrno = TAOS_SYSTEM_ERROR(errno); terrno = TAOS_SYSTEM_ERROR(errno);
} else { } else {
uError("failed to get the ip address, fqdn:%s, code:%d, reason:%s", fqdn, ret, gai_strerror(ret)); 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; return 0xFFFFFFFF;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册