From d6414c9ff74e3f8076a1e94d3c6074366119900e Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 12 Aug 2013 21:25:36 -0400 Subject: Windows compiles! (w/Visual Studio 2012) That's about all it does, but it's a start. --- node/Logger.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'node/Logger.cpp') diff --git a/node/Logger.cpp b/node/Logger.cpp index 7bed5990..71b4893d 100644 --- a/node/Logger.cpp +++ b/node/Logger.cpp @@ -30,6 +30,8 @@ #include #include #include + +#include "Constants.hpp" #include "Logger.hpp" namespace ZeroTier { @@ -64,7 +66,12 @@ void Logger::log(const char *fmt,...) if (_log) { time_t now = time(0); +#ifdef __WINDOWS__ + ctime_s(tmp,sizeof(tmp),&now); + char *nowstr = tmp; +#else char *nowstr = ctime_r(&now,tmp); +#endif for(char *c=nowstr;*c;++c) { if (*c == '\n') *c = '\0'; -- cgit v1.2.3