fix request-logging build on windows

This commit is contained in:
Arvid Norberg 2013-06-18 03:18:47 +00:00
parent fd77101723
commit dcfd69fbe3
1 changed files with 6 additions and 1 deletions

View File

@ -693,7 +693,12 @@ namespace aux {
#ifdef TORRENT_REQUEST_LOGGING
char log_filename[200];
snprintf(log_filename, sizeof(log_filename), "requests-%d.log", getpid());
#ifdef TORRENT_WINDOWS
const int pid = GetCurrentProcessId();
#else
const int pid = getpid();
#endif
snprintf(log_filename, sizeof(log_filename), "requests-%d.log", pid);
m_request_log = fopen(log_filename, "w+");
if (m_request_log == 0)
{