From 84543c8be2076b747bbc730a760e7693ab6caae4 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Sun, 17 Apr 2016 19:29:27 -0700 Subject: Worked around the lack of a rand_r function on windows systems --- unsupported/test/cxx11_eventcount.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'unsupported/test/cxx11_eventcount.cpp') 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); -- cgit v1.2.3