mirror of
https://github.com/yawut/SDL.git
synced 2026-04-24 15:26:55 -05:00
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()
This commit is contained in:
parent
4386417754
commit
8eaf7c78b9
|
|
@ -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…
Reference in New Issue
Block a user