mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Fix cpu_count() on some platforms
When we use sysconf(_SC_NPROCESSORS_ONLN) to get number of cores, we have to include sysconf library that is unistd.h Sometimes it happens to work just becuase unistd.h indirectly included by some other libraries, but not always. Reported and fixed by Eyal BD No functional change.
This commit is contained in:
parent
f84f04742a
commit
4381ea23fe
1 changed files with 1 additions and 0 deletions
|
@ -40,6 +40,7 @@ typedef unsigned __int64 uint64_t;
|
|||
|
||||
#else
|
||||
# include <inttypes.h>
|
||||
# include <unistd.h> // Used by sysconf(_SC_NPROCESSORS_ONLN)
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && !defined(_WIN64) // Linux - Unix
|
||||
|
|
Loading…
Add table
Reference in a new issue