]> granicus.if.org Git - libx264/commitdiff
add / fix support for FreeBSD, based on a patch by Igor Mozolevsky % igor A hybrid...
authorGuillaume Poirier <gpoirier@mplayerhq.hu>
Mon, 14 Jan 2008 09:54:33 +0000 (09:54 +0000)
committerGuillaume Poirier <gpoirier@mplayerhq.hu>
Mon, 14 Jan 2008 09:54:33 +0000 (09:54 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@720 df754926-b1dd-0310-bc7b-ec298dee348c

common/cpu.c

index 046950a3408f6fc0bf955b6f2c69d0172e870042..1de9fb166dd9e6bb5b8368488b46eae9e9dedc7b 100644 (file)
@@ -28,7 +28,7 @@
 #ifdef SYS_BEOS
 #include <kernel/OS.h>
 #endif
-#ifdef SYS_MACOSX
+#if defined(SYS_MACOSX) || defined(SYS_FREEBSD)
 #include <sys/types.h>
 #include <sys/sysctl.h>
 #endif
@@ -237,7 +237,7 @@ int x264_cpu_num_processors( void )
     get_system_info( &info );
     return info.cpu_count;
 
-#elif defined(SYS_MACOSX)
+#elif defined(SYS_MACOSX) || defined(SYS_FREEBSD)
     int numberOfCPUs;
     size_t length = sizeof( numberOfCPUs );
     if( sysctlbyname("hw.ncpu", &numberOfCPUs, &length, NULL, 0) )