diff options
author | Chris Wilson <chris+github@qwirx.com> | 2006-09-02 11:02:44 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2006-09-02 11:02:44 +0000 |
commit | b5a3da46888df6749712f8d1b04ef4393230b49a (patch) | |
tree | 7233cbacd9770be26c643251c3842d3adcaa390b /test/backupstorepatch | |
parent | 07b592e5e1dc1be6603d0b67906f55e40a494b8e (diff) |
(refs #3)
Initialise Windows sockets on Win32
Diffstat (limited to 'test/backupstorepatch')
-rw-r--r-- | test/backupstorepatch/testbackupstorepatch.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/backupstorepatch/testbackupstorepatch.cpp b/test/backupstorepatch/testbackupstorepatch.cpp index 5d77c3fd..83ee2a8e 100644 --- a/test/backupstorepatch/testbackupstorepatch.cpp +++ b/test/backupstorepatch/testbackupstorepatch.cpp @@ -283,6 +283,14 @@ void test_depends_in_dirs() int test(int argc, const char *argv[]) { +#ifdef WIN32 + // Under win32 we must initialise the Winsock library + // before using sockets + + WSADATA info; + TEST_THAT(WSAStartup(0x0101, &info) != SOCKET_ERROR) +#endif + // Allocate a buffer buffer = ::malloc(BUFFER_SIZE); TEST_THAT(buffer != 0); |