Fix compile under MSVC

This commit is contained in:
Jeffrey Walton 2019-01-20 22:45:53 -05:00
parent 672f5c7f3d
commit 7e96a283a3
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 4 additions and 2 deletions

View File

@ -154,7 +154,7 @@ LDLIBS =
# Debug build.
# CXXFLAGS = $(CXXFLAGS) /DDEBUG /D_DEBUG /Oi /Oy- /Od /MTd
# Release build. Add /OPT:REF to linker
CXXFLAGS = $(CXXFLAGS) /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT
CXXFLAGS = $(CXXFLAGS) /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT /openmp
# Linker flags.
LDFLAGS = $(LDFLAGS) /OPT:REF

View File

@ -14,6 +14,8 @@
#include "sha.h"
#include <sstream>
#include <limits>
#ifdef _OPENMP
# include <omp.h>
#endif
@ -189,7 +191,7 @@ void Scrypt::ValidateParameters(size_t derivedLen, word64 cost, word64 blockSize
{
std::ostringstream oss;
oss << " parallelization " << parallelization << " is larger than ";
oss << numeric_limits<int>::max();
oss << std::numeric_limits<int>::max();
throw InvalidArgument("Scrypt: " + oss.str());
}