Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
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()
  • Loading branch information
slouken committed Jan 6, 2010
1 parent cb5edf2 commit 45b66170deda19913fe976401104f8ab715ed2bc
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/cpuinfo/SDL_cpuinfo.c
@@ -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);
}

0 comments on commit 45b6617

Please sign in to comment.