summaryrefslogtreecommitdiff
path: root/node/Network.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2013-08-12 21:25:36 -0400
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2013-08-12 21:25:36 -0400
commitd6414c9ff74e3f8076a1e94d3c6074366119900e (patch)
treeb0620f1f1610b51b386964d6758b5787b6cb7d6f /node/Network.cpp
parent5076c75b079fe02c843ca85dc20821e468b2d7b8 (diff)
downloadinfinitytier-d6414c9ff74e3f8076a1e94d3c6074366119900e.tar.gz
infinitytier-d6414c9ff74e3f8076a1e94d3c6074366119900e.zip
Windows compiles! (w/Visual Studio 2012) That's about all it does, but it's a start.
Diffstat (limited to 'node/Network.cpp')
-rw-r--r--node/Network.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/node/Network.cpp b/node/Network.cpp
index 3593b732..314c9feb 100644
--- a/node/Network.cpp
+++ b/node/Network.cpp
@@ -86,9 +86,15 @@ bool Network::Certificate::qualifyMembership(const Network::Certificate &mc) con
if (fabs(my - their) > delta)
return false;
} else {
+#ifdef __WINDOWS__
+ int64_t my = _strtoi64(myField->second.c_str(),(char **)0,10);
+ int64_t their = _strtoi64(theirField->second.c_str(),(char **)0,10);
+ int64_t delta = _strtoi64(deltaField->second.c_str(),(char **)0,10);
+#else
int64_t my = strtoll(myField->second.c_str(),(char **)0,10);
int64_t their = strtoll(theirField->second.c_str(),(char **)0,10);
int64_t delta = strtoll(deltaField->second.c_str(),(char **)0,10);
+#endif
if (my > their) {
if ((my - their) > delta)
return false;