mirror of
https://github.com/yawut/SDL.git
synced 2026-08-22 16:55:29 -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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user