diff --git a/lib/diagnostics.h b/lib/diagnostics.h index 7e4cd0e22d..2f12d0bfe5 100644 --- a/lib/diagnostics.h +++ b/lib/diagnostics.h @@ -17,6 +17,7 @@ // Contributor(s): // +#include #include "exception.h" #ifndef _BOINC_DIAGNOSTICS_ @@ -24,6 +25,8 @@ #ifdef _WIN32 +#include "stdafx.h" +#undef min // Define macros for both debug and release builds. // diff --git a/lib/util.h b/lib/util.h index b73255d54f..c2c6393be7 100755 --- a/lib/util.h +++ b/lib/util.h @@ -20,7 +20,6 @@ #ifndef UTIL_H #define UTIL_H -#ifndef _WIN32 #include #include #include @@ -28,7 +27,6 @@ #include #include #include -#endif #if !defined(HAVE_STRLCPY) extern size_t strlcpy(char*, const char*, size_t); @@ -105,6 +103,7 @@ extern bool debug_fake_exponential_backoff; #ifdef _WIN32 +#include "windows.h" char* windows_error_string(char* pszBuf, int iSize); char* windows_format_error_string( unsigned long dwError, char* pszBuf, int iSize