Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug #924
Browse files Browse the repository at this point in the history
Only use sysconf if _SC_NPROCESSORS_ONLN is available.  Fortunately the case for this was Mac OS X 10.4, which has sysctlbyname()
  • Loading branch information
slouken committed Jan 6, 2010
1 parent cb5edf2 commit 45b6617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpuinfo/SDL_cpuinfo.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 45b6617

Please sign in to comment.