]> git.videolan.org Git - x264.git/commitdiff
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 3cae6f84b3cf4556e99e31ea71c4e1eb9c9111ce..2ec308403582ee5c2ae64fbbd40aa4441e2d86a8 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