eliminate mac xcode 5 only warning

on os x 10.9.2 unistd.h defines sysconf as

long	 sysconf(int);

R=mtklein@google.com, reed@google.com

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/261673004

git-svn-id: http://skia.googlecode.com/svn/trunk@14559 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2014-05-04 00:46:50 +00:00
parent 09d2dcdfc9
commit f8a8ae1322

View File

@ -26,7 +26,7 @@ static inline int num_cores() {
GetSystemInfo(&sysinfo);
return sysinfo.dwNumberOfProcessors;
#elif defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_ANDROID)
return sysconf(_SC_NPROCESSORS_ONLN);
return (int) sysconf(_SC_NPROCESSORS_ONLN);
#else
return 1;
#endif