Skip to content

Commit

Permalink
Fix build for cygwin/bsd (#2882)
Browse files Browse the repository at this point in the history
  • Loading branch information
binhdvo authored Nov 29, 2021
1 parent 7abebc8 commit d7e1736
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions programs/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d7e1736

Please sign in to comment.