src/cpuinfo/SDL_cpuinfo.c
changeset 3606 1a4456a01995
parent 3587 2080e8d75ac6
child 3697 f7b03b6838cb
equal deleted inserted replaced
3605:55b0a0191163 3606:1a4456a01995
   306 
   306 
   307 int
   307 int
   308 SDL_GetCPUCount()
   308 SDL_GetCPUCount()
   309 {
   309 {
   310     if (!SDL_CPUCount) {
   310     if (!SDL_CPUCount) {
   311 #ifdef HAVE_SYSCONF
   311 #if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN)
   312         if (SDL_CPUCount <= 0) {
   312         if (SDL_CPUCount <= 0) {
   313             SDL_CPUCount = (int)sysconf(_SC_NPROCESSORS_ONLN);
   313             SDL_CPUCount = (int)sysconf(_SC_NPROCESSORS_ONLN);
   314         }
   314         }
   315 #endif
   315 #endif
   316 #ifdef HAVE_SYSCTLBYNAME
   316 #ifdef HAVE_SYSCTLBYNAME