Skip to content

Commit fb43500

Browse files
authored
ZOOKEEPER-4989: Fix c client compilation on Windows with MSVC
Reviewers: kezhuw Author: jmalopoy Closes #2335 from jmalopoy/zookeeper-4989
1 parent e8e141b commit fb43500

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
@@ -5131,7 +5131,11 @@ int zoo_add_auth(zhandle_t *zh,const char* scheme,const char* cert,
51315131

51325132
static const char* format_endpoint_info(const struct sockaddr_storage* ep)
51335133
{
5134+
#if defined(_MSC_VER)
5135+
static __declspec(thread) char buf[134] = { 0 };
5136+
#else
51345137
static __thread char buf[134] = { 0 };
5138+
#endif
51355139
char addrstr[INET6_ADDRSTRLEN] = { 0 };
51365140
const char *fmtstring;
51375141
void *inaddr;

0 commit comments

Comments
 (0)