From fa919d26e30349cccc9afc2cc787adf45a897937 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 17 Jun 2013 04:12:18 +0000 Subject: [PATCH] fix windows test build --- test/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/main.cpp b/test/main.cpp index 591cc233a..7372d788e 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -36,6 +36,10 @@ POSSIBILITY OF SUCH DAMAGE. #include #include // for exit() +#ifdef TORRENT_WINDOWS +#include // for _chdir +#endif + int test_main(); extern bool tests_failure; @@ -110,7 +114,11 @@ int main() fprintf(stderr, "Failed to create test directory: %s\n", ec.message().c_str()); return 1; } +#ifdef TORRENT_WINDOWS + _chdir(dir); +#else chdir(dir); +#endif #ifndef BOOST_NO_EXCEPTIONS try