Solaris: use sysconf to get processor count
authorSean McGovern <gseanmcg@gmail.com>
Fri, 23 Nov 2012 02:01:16 +0000 (18:01 -0800)
committerJason Garrett-Glaser <jason@x264.com>
Thu, 6 Dec 2012 23:52:22 +0000 (15:52 -0800)
Solaris responds correctly to the same value as Cygwin, so let's use that.

common/cpu.c

index 3cae6f8..2ec3084 100644 (file)
@@ -402,7 +402,7 @@ int x264_cpu_num_processors( void )
 #elif SYS_WINDOWS
     return x264_pthread_num_processors_np();
 
-#elif SYS_CYGWIN
+#elif SYS_CYGWIN || SYS_SunOS
     return sysconf( _SC_NPROCESSORS_ONLN );
 
 #elif SYS_LINUX