From 774c3b536a9fbfeb2d1702c0738820415cf86a19 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 7 Jan 2015 16:47:37 +0000 Subject: [PATCH] fix winows build --- examples/client_test.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 68fc15635..dad09ac79 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -35,7 +35,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/config.hpp" #ifdef TORRENT_WINDOWS -#include // for _mkdir +#include // for _mkdir and _getcwd #include // for _stat #include #endif @@ -640,7 +640,11 @@ std::string path_to_url(std::string f) if (!is_absolute_path(f)) { char cwd[TORRENT_MAX_PATH]; +#if defined TORRENT_WINDOWS && !defined TORRENT_MINGW + _getcwd(cwd, sizeof(cwd)); +#else getcwd(cwd, sizeof(cwd)); +#endif f = path_append(cwd, f); }