This is an automated email from the ASF dual-hosted git repository.

kezhuw pushed a commit to branch branch-3.9
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/branch-3.9 by this push:
     new 3412d237e ZOOKEEPER-4989: Fix c client compilation on Windows with MSVC
3412d237e is described below

commit 3412d237e5a0174a28f963747c359031248b7c55
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
    
    (cherry picked from commit fb43500ea53fa5b57b6dc549c6582ae0ac60d7bc)
    Signed-off-by: Kezhu Wang <[email protected]>
---
 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 9cc6f6e01..0ade9d65b 100644
--- a/zookeeper-client/zookeeper-client-c/src/zookeeper.c
+++ b/zookeeper-client/zookeeper-client-c/src/zookeeper.c
@@ -5113,7 +5113,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;

Reply via email to