Skip to content

Commit 3412d23

Browse files
jmalopoykezhuw
authored andcommitted
ZOOKEEPER-4989: Fix c client compilation on Windows with MSVC
Reviewers: kezhuw Author: jmalopoy Closes #2335 from jmalopoy/zookeeper-4989 (cherry picked from commit fb43500) Signed-off-by: Kezhu Wang <[email protected]>
1 parent 40a07c9 commit 3412d23

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

zookeeper-client/zookeeper-client-c/src/zookeeper.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5113,7 +5113,11 @@ int zoo_add_auth(zhandle_t *zh,const char* scheme,const char* cert,
51135113

51145114
static const char* format_endpoint_info(const struct sockaddr_storage* ep)
51155115
{
5116+
#if defined(_MSC_VER)
5117+
static __declspec(thread) char buf[134] = { 0 };
5118+
#else
51165119
static __thread char buf[134] = { 0 };
5120+
#endif
51175121
char addrstr[INET6_ADDRSTRLEN] = { 0 };
51185122
const char *fmtstring;
51195123
void *inaddr;

0 commit comments

Comments
 (0)