Fix build for cygwin/bsd (#2882)
This commit is contained in:
+2
-2
@@ -1359,11 +1359,11 @@ int UTIL_countCores(int logical)
|
|||||||
* see: man 3 sysconf */
|
* see: man 3 sysconf */
|
||||||
int UTIL_countCores(int logical)
|
int UTIL_countCores(int logical)
|
||||||
{
|
{
|
||||||
|
static int numCores = 0;
|
||||||
|
|
||||||
/* suppress unused parameter warning */
|
/* suppress unused parameter warning */
|
||||||
(void)logical;
|
(void)logical;
|
||||||
|
|
||||||
static int numCores = 0;
|
|
||||||
|
|
||||||
if (numCores != 0) return numCores;
|
if (numCores != 0) return numCores;
|
||||||
|
|
||||||
numCores = (int)sysconf(_SC_NPROCESSORS_ONLN);
|
numCores = (int)sysconf(_SC_NPROCESSORS_ONLN);
|
||||||
|
|||||||
Reference in New Issue
Block a user