summaryrefslogtreecommitdiff
path: root/selftest.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2015-04-24 15:05:28 -0700
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2015-04-24 15:05:28 -0700
commitf5848972f992e20093da85e91761c327e2f3d3ce (patch)
treed491a4d7fcb425b5c4a639af925a895d27e8dfd4 /selftest.cpp
parent54954f5b8886bd6ea49e043fa5a695fcd7608c68 (diff)
downloadinfinitytier-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 'selftest.cpp')
-rw-r--r--selftest.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/selftest.cpp b/selftest.cpp
index ea90813e..319271f3 100644
--- a/selftest.cpp
+++ b/selftest.cpp
@@ -628,7 +628,7 @@ struct TestPhyHandlers
{
std::string *testMessage = (std::string *)*uptr;
if ((testMessage)&&(testMessage->length() > 0)) {
- long sent = testPhyInstance->tcpSend(sock,(const void *)testMessage->data(),testMessage->length(),true);
+ long sent = testPhyInstance->tcpSend(sock,(const void *)testMessage->data(),(unsigned long)testMessage->length(),true);
if (sent > 0)
testMessage->erase(0,sent);
}
@@ -804,6 +804,11 @@ int main(int argc,char **argv)
{
int r = 0;
+#ifdef __WINDOWS__
+ WSADATA wsaData;
+ WSAStartup(MAKEWORD(2,2),&wsaData);
+#endif
+
// Code to generate the C25519 test vectors -- did this once and then
// put these up top so that we can ensure that every platform produces
// the same result.