From e51050bf983b6bb3c616627fef7d2d9aad99278f Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Fri, 11 Nov 2022 18:02:51 +0800 Subject: [PATCH] fix compilation MACRO --- src/util/src/tsocket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/src/tsocket.c b/src/util/src/tsocket.c index 3bfa309387..43812bd713 100644 --- a/src/util/src/tsocket.c +++ b/src/util/src/tsocket.c @@ -352,7 +352,7 @@ SOCKET taosOpenTcpClientSocket(uint32_t destIp, uint16_t destPort, uint32_t clie serverAddr.sin_addr.s_addr = destIp; serverAddr.sin_port = (uint16_t)htons((uint16_t)destPort); -#ifdef _TD_LINUX +#if defined(_TD_LINUX) taosSetNonblocking(sockFd, 1); ret = connect(sockFd, (struct sockaddr *)&serverAddr, sizeof(serverAddr)); if (ret == -1) { @@ -386,7 +386,7 @@ SOCKET taosOpenTcpClientSocket(uint32_t destIp, uint16_t destPort, uint32_t clie } } taosSetNonblocking(sockFd, 0); -#elif _TD_WINDOWS +#elif defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32) || defined(_TD_WINDOWS) taosSetNonblocking(sockFd, 1); ret = connect(sockFd, (struct sockaddr *)&serverAddr, sizeof(serverAddr)); -- GitLab