diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index efe0eb764..2d48eb538 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -1331,7 +1331,7 @@ inline void queryCacheSizes(int& l1, int& l2, int& l3) { val_size = sizeof(val); if (sysctlbyname("hw.l3cachesize", &val, &val_size, NULL, 0) == 0 && val > 0) l3 = static_cast(val); } -#elif defined(_SC_LEVEL1_DCACHE_SIZE) +#elif EIGEN_OS_UNIX && defined(_SC_LEVEL1_DCACHE_SIZE) // On Linux and other POSIX systems, use sysconf to query cache sizes. l1 = sysconf(_SC_LEVEL1_DCACHE_SIZE); l2 = sysconf(_SC_LEVEL2_CACHE_SIZE); diff --git a/test/redux.cpp b/test/redux.cpp index fa1ff994f..ad3ff1fe2 100644 --- a/test/redux.cpp +++ b/test/redux.cpp @@ -14,8 +14,8 @@ #include "main.h" - template - void matrixRedux(const MatrixType& m) { +template +void matrixRedux(const MatrixType& m) { typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar;