[x264-devel] Solaris: use sysconf to get processor count

Sean McGovern git at videolan.org
Wed Jan 9 19:32:22 CET 2013


x264 | branch: master | Sean McGovern <gseanmcg at gmail.com> | Thu Nov 22 18:01:16 2012 -0800| [67a69c06d7bd7907b5d1e058a26284c06baa93d1] | committer: Jason Garrett-Glaser

Solaris: use sysconf to get processor count
Solaris responds correctly to the same value as Cygwin, so let's use that.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=67a69c06d7bd7907b5d1e058a26284c06baa93d1
---

 common/cpu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/cpu.c b/common/cpu.c
index 3cae6f8..2ec3084 100644
--- a/common/cpu.c
+++ b/common/cpu.c
@@ -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



More information about the x264-devel mailing list