This is an automated email from the ASF dual-hosted git repository.
kezhuw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git
The following commit(s) were added to refs/heads/master by this push:
new fb43500ea ZOOKEEPER-4989: Fix c client compilation on Windows with MSVC
fb43500ea is described below
commit fb43500ea53fa5b57b6dc549c6582ae0ac60d7bc
Author: jmalopoy <[email protected]>
AuthorDate: Mon Nov 10 14:19:53 2025 +0100
ZOOKEEPER-4989: Fix c client compilation on Windows with MSVC
Reviewers: kezhuw
Author: jmalopoy
Closes #2335 from jmalopoy/zookeeper-4989
---
zookeeper-client/zookeeper-client-c/src/zookeeper.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/zookeeper-client/zookeeper-client-c/src/zookeeper.c
b/zookeeper-client/zookeeper-client-c/src/zookeeper.c
index 645510b14..cdd9d74a5 100644
--- a/zookeeper-client/zookeeper-client-c/src/zookeeper.c
+++ b/zookeeper-client/zookeeper-client-c/src/zookeeper.c
@@ -5131,7 +5131,11 @@ int zoo_add_auth(zhandle_t *zh,const char* scheme,const
char* cert,
static const char* format_endpoint_info(const struct sockaddr_storage* ep)
{
+#if defined(_MSC_VER)
+ static __declspec(thread) char buf[134] = { 0 };
+#else
static __thread char buf[134] = { 0 };
+#endif
char addrstr[INET6_ADDRSTRLEN] = { 0 };
const char *fmtstring;
void *inaddr;