Mercurial > sdl-ios-xcode
changeset 3606:1a4456a01995
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()
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 06 Jan 2010 04:33:31 +0000 |
parents | 55b0a0191163 |
children | 8b4c0320638e |
files | src/cpuinfo/SDL_cpuinfo.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cpuinfo/SDL_cpuinfo.c Wed Dec 30 19:48:23 2009 +0000 +++ b/src/cpuinfo/SDL_cpuinfo.c Wed Jan 06 04:33:31 2010 +0000 @@ -308,7 +308,7 @@ 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); }