mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 17:09:00 +08:00
8c64785e78
* [zookeeper-mt] Add new port * [zookeeper-mt] Upgrade from 3.5.4-beta to 3.5.5 * [zookeeper-mt] Fix upgrade * disable warnings and add static library check * edit cmake file * add async feature * add back some changes for export * add sync feature, disable parallel configure
30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
diff --git a/zookeeper-client/zookeeper-client-c/src/zk_log.c b/zookeeper-client/zookeeper-client-c/src/zk_log.c
|
|
index 436485e..1902b09 100644
|
|
--- a/zookeeper-client/zookeeper-client-c/src/zk_log.c
|
|
+++ b/zookeeper-client/zookeeper-client-c/src/zk_log.c
|
|
@@ -108,8 +108,11 @@ static const char* time_now(char* now_str){
|
|
gettimeofday(&tv,0);
|
|
|
|
now = tv.tv_sec;
|
|
+#ifdef WIN32
|
|
+ localtime_s(<, &now);
|
|
+#else
|
|
localtime_r(&now, <);
|
|
-
|
|
+#endif
|
|
// clone the format used by log4j ISO8601DateFormat
|
|
// specifically: "yyyy-MM-dd HH:mm:ss,SSS"
|
|
|
|
diff --git a/zookeeper-client/zookeeper-client-c/src/zookeeper.c b/zookeeper-client/zookeeper-client-c/src/zookeeper.c
|
|
index 25baa9c..96ed379 100644
|
|
--- a/zookeeper-client/zookeeper-client-c/src/zookeeper.c
|
|
+++ b/zookeeper-client/zookeeper-client-c/src/zookeeper.c
|
|
@@ -90,6 +90,7 @@
|
|
#define EAI_ADDRFAMILY WSAEINVAL /* is this still needed? */
|
|
#define EHOSTDOWN EPIPE
|
|
#define ESTALE ENODEV
|
|
+#define strtok_r strtok_s
|
|
#endif
|
|
|
|
#define IF_DEBUG(x) if(logLevel==ZOO_LOG_LEVEL_DEBUG) {x;}
|