diff --git a/src/random.cpp b/src/random.cpp --- a/src/random.cpp +++ b/src/random.cpp @@ -24,6 +24,9 @@ #include #include #include + +#include + #ifndef WIN32 #include #include @@ -370,8 +373,8 @@ // This C++11 idiom relies on the guarantee that static variable are // initialized on first call, even when multiple parallel calls are // permitted. - static std::unique_ptr g_rng{new RNGState()}; - return *g_rng; + static std::vector> g_rng(1); + return g_rng[0]; } } // namespace