diff options
| author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2015-04-24 15:05:28 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2015-04-24 15:05:28 -0700 |
| commit | f5848972f992e20093da85e91761c327e2f3d3ce (patch) | |
| tree | d491a4d7fcb425b5c4a639af925a895d27e8dfd4 /node/Node.cpp | |
| parent | 54954f5b8886bd6ea49e043fa5a695fcd7608c68 (diff) | |
| download | infinitytier-f5848972f992e20093da85e91761c327e2f3d3ce.tar.gz infinitytier-f5848972f992e20093da85e91761c327e2f3d3ce.zip | |
Windows now builds and runs selftest correctly, and fixed a Windows (and possibly other platforms) issue in Phy<>.
Diffstat (limited to 'node/Node.cpp')
| -rw-r--r-- | node/Node.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index 855b8266..e77a977e 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -426,7 +426,7 @@ std::string Node::dataStoreGet(const char *name) std::string r; unsigned long olen = 0; do { - long n = _dataStoreGetFunction(reinterpret_cast<ZT1_Node *>(this),_uPtr,name,buf,sizeof(buf),r.length(),&olen); + long n = _dataStoreGetFunction(reinterpret_cast<ZT1_Node *>(this),_uPtr,name,buf,sizeof(buf),(unsigned long)r.length(),&olen); if (n <= 0) return std::string(); r.append(buf,n); @@ -454,14 +454,14 @@ void Node::postTrace(const char *module,unsigned int line,const char *fmt,...) Mutex::Lock _l(traceLock); + time_t now = (time_t)(_now / 1000ULL); #ifdef __WINDOWS__ ctime_s(tmp3,sizeof(tmp3),&now); char *nowstr = tmp3; #else - time_t now = (time_t)(_now / 1000ULL); char *nowstr = ctime_r(&now,tmp3); #endif - unsigned long nowstrlen = strlen(nowstr); + unsigned long nowstrlen = (unsigned long)strlen(nowstr); if (nowstr[nowstrlen-1] == '\n') nowstr[--nowstrlen] = (char)0; if (nowstr[nowstrlen-1] == '\r') |
