Worked around the lack of a rand_r function on windows systems

This commit is contained in:
Benoit Steiner 2016-04-17 19:29:27 -07:00
parent 5fbcfe5eb4
commit 84543c8be2

View File

@ -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);