From b5a3da46888df6749712f8d1b04ef4393230b49a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 2 Sep 2006 11:02:44 +0000 Subject: (refs #3) Initialise Windows sockets on Win32 --- test/backupstorepatch/testbackupstorepatch.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- cgit v1.2.3