MPProcessorsScheduled only avaialble on Mac version 10 and later
authorGengbin Zheng <gzheng@illinois.edu>
Fri, 31 Oct 2008 16:42:27 +0000 (16:42 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Fri, 31 Oct 2008 16:42:27 +0000 (16:42 +0000)
src/conv-core/cputopology.C

index cbfa067a6d51782ab598f2e4e802456683b3f623..01f311a379d6e142a57777cda24783e91fe5cc6f 100644 (file)
@@ -25,8 +25,9 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#if defined(__APPLE__) 
+#if defined(__APPLE__)  && CMK_HAS_MULTIPROCESSING_H
 #include <Carbon/Carbon.h>
+#include <Multiprocessing.h>
 #endif
 
 extern "C" int CmiNumCores(void) {
@@ -46,7 +47,7 @@ struct _SYSTEM_INFO sysinfo;
     }
   }
 
-#if defined(__APPLE__) 
+#if defined(__APPLE__)  && CMK_HAS_MULTIPROCESSING_H
   a = MPProcessorsScheduled(); /* Number of active/running CPUs */
 #endif