aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/cxx11_eventcount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unsupported/test/cxx11_eventcount.cpp')
-rw-r--r--unsupported/test/cxx11_eventcount.cpp8
1 files changed, 8 insertions, 0 deletions
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 <Eigen/CXX11/ThreadPool>
+#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<EventCount::Waiter> waiters(1);