Fixed bug #924
Only use sysconf if _SC_NPROCESSORS_ONLN is available. Fortunately the case for this was Mac OS X 10.4, which has sysctlbyname() --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404356
This commit is contained in:
parent
f1255da8b2
commit
f643e8c798
1 changed files with 1 additions and 1 deletions
|
@ -308,7 +308,7 @@ int
|
|||
SDL_GetCPUCount()
|
||||
{
|
||||
if (!SDL_CPUCount) {
|
||||
#ifdef HAVE_SYSCONF
|
||||
#if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN)
|
||||
if (SDL_CPUCount <= 0) {
|
||||
SDL_CPUCount = (int)sysconf(_SC_NPROCESSORS_ONLN);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue