Fix build for cygwin/bsd (#2882)

This commit is contained in:
binhdvo 2021-11-29 14:11:39 -05:00 committed by GitHub
parent 7abebc847b
commit d7e1736375
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1359,11 +1359,11 @@ int UTIL_countCores(int logical)
* see: man 3 sysconf */
int UTIL_countCores(int logical)
{
/* suppress unused parameter warning */
(void) logical;
static int numCores = 0;
/* suppress unused parameter warning */
(void)logical;
if (numCores != 0) return numCores;
numCores = (int)sysconf(_SC_NPROCESSORS_ONLN);