From 7e96a283a3192d29aac5b60e5b4ff19248f00d9a Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 20 Jan 2019 22:45:53 -0500 Subject: [PATCH] Fix compile under MSVC --- cryptest.nmake | 2 +- scrypt.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cryptest.nmake b/cryptest.nmake index 1c547ed3..f759b650 100644 --- a/cryptest.nmake +++ b/cryptest.nmake @@ -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 diff --git a/scrypt.cpp b/scrypt.cpp index 27e604ee..667d7cb3 100644 --- a/scrypt.cpp +++ b/scrypt.cpp @@ -14,6 +14,8 @@ #include "sha.h" #include +#include + #ifdef _OPENMP # include #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::max(); + oss << std::numeric_limits::max(); throw InvalidArgument("Scrypt: " + oss.str()); }