mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-16 22:28:17 +00:00
Windows compiles! (w/Visual Studio 2012) That's about all it does, but it's a start.
This commit is contained in:
@ -30,6 +30,8 @@
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
|
||||
#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';
|
||||
|
Reference in New Issue
Block a user