diff --git a/unsupported/Eigen/CXX11/Tensor b/unsupported/Eigen/CXX11/Tensor index 05c5127a10..54d3cc18b0 100644 --- a/unsupported/Eigen/CXX11/Tensor +++ b/unsupported/Eigen/CXX11/Tensor @@ -34,6 +34,14 @@ #include #endif +#ifdef _WIN32 +#include +#elif defined(__APPLE__) +#include +#else +#include +#endif + #ifdef EIGEN_USE_THREADS #include #include diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h b/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h index da9763a3da..1b031b7a1b 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h @@ -196,7 +196,7 @@ int get_random_seed() { GetSystemTime(&st); return st.wSecond + 1000 * st.wMilliseconds; #elif defined __APPLE__ - return mach_absolute_time(); + return static_cast(mach_absolute_time()); #else timespec ts; clock_gettime(CLOCK_REALTIME, &ts);