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 /selftest.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 'selftest.cpp')
-rw-r--r-- | selftest.cpp | 7 |
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. |