[x264-devel] bug in common/cpu.c

Anders Brownworth abrownworth-videolan-x264 at bandwidth.com
Wed Jul 18 16:12:21 CEST 2007


Guillaume Poirier wrote:
> Anders Brownworth wrote:
>   
>> I ran into a compile error in common/cpu.c in the 
>> x264-snapshot-20070717-2245 source. Patch to fix is:
>>
>> 214c214
>> <     sched_getaffinity( 0, sizeof(p_aff), &p_aff );
>> ---
>>  >     sched_getaffinity( sizeof(p_aff), &p_aff );
>>
>>
>>     
>
> On which Operating System did you experience this problem?
> No problem here on OSX and Linux.
>
> Guillaume
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel
>   

This is Linux 2.6.18 - Gentoo flavor. Error was:

gcc -O4 -ffast-math  -Wall -I. -DHAVE_MALLOC_H -DHAVE_MMX -DARCH_X86 
-DSYS_LINUX -DHAVE_PTHREAD -s -fomit-frame-pointer   -c -o common/cpu.o 
common/cpu.c
common/cpu.c: In function `x264_cpu_num_processors':
common/cpu.c:214: warning: passing arg 2 of `sched_getaffinity' makes 
pointer from integer without a cast
common/cpu.c:214: error: too many arguments to function `sched_getaffinity'
make: *** [common/cpu.o] Error 1

On a hunch I eliminated the first param, recompiled and it worked. Where 
is sched_getaffinity defined?
_______________________________________________
x264-devel mailing list
x264-devel at videolan.org
http://mailman.videolan.org/listinfo/x264-devel


More information about the x264-devel mailing list