diff --git a/unsupported/test/cxx11_eventcount.cpp b/unsupported/test/cxx11_eventcount.cpp index ebd019e2d..59039dae9 100644 --- a/unsupported/test/cxx11_eventcount.cpp +++ b/unsupported/test/cxx11_eventcount.cpp @@ -12,6 +12,14 @@ #include "main.h" #include +#ifdef EIGEN_COMP_MSVC_STRICT +// Visual studio doesn't implementan rand_r() function since its +// implementation of rand()is already thread safe +int rand_r(unsigned int*) { + return rand(); +} +#endif + static void test_basic_eventcount() { std::vector waiters(1);