From: Guillaume Poirier Date: Mon, 14 Jan 2008 09:54:33 +0000 (+0000) Subject: add / fix support for FreeBSD, based on a patch by Igor Mozolevsky % igor A hybrid... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8105162bf7fba8b7d467d5a185db25e4696d74d6;p=libx264 add / fix support for FreeBSD, based on a patch by Igor Mozolevsky % igor A hybrid-lab P co P uk % git-svn-id: svn://svn.videolan.org/x264/trunk@720 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/common/cpu.c b/common/cpu.c index 046950a3..1de9fb16 100644 --- a/common/cpu.c +++ b/common/cpu.c @@ -28,7 +28,7 @@ #ifdef SYS_BEOS #include #endif -#ifdef SYS_MACOSX +#if defined(SYS_MACOSX) || defined(SYS_FREEBSD) #include #include #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) )