fix winows build

This commit is contained in:
Arvid Norberg 2015-01-07 16:47:37 +00:00
parent c9075a530d
commit 774c3b536a
1 changed files with 5 additions and 1 deletions

View File

@ -35,7 +35,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/config.hpp"
#ifdef TORRENT_WINDOWS
#include <direct.h> // for _mkdir
#include <direct.h> // for _mkdir and _getcwd
#include <sys/types.h> // for _stat
#include <sys/stat.h>
#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);
}