[x264-devel] x264-snapshot-20061229-2245 on Linux 2.4, glibc 2.2.5

Gabor Z. Papp gzp at papp.hu
Sat Dec 30 10:28:42 CET 2006


[kernel]
Linux gzp1 2.4.34-gzp1 #1 Wed Dec 27 16:09:23 CET 2006 i686 GNU/Linux

[glibc]
GNU C Library stable release version 2.2.5, by Roland McGrath et al.
Compiled by GNU CC version 2.95.4 20010319 (prerelease).
Compiled on a Linux 2.4.17 system on 2002-01-21.

[gcc]
gcc (GCC) 4.1.1

[binutils]
GNU ld version 2.17.50.0.7 20061127

gcc -O4 -ffast-math -Wall -I. -D__X264__ -DHAVE_MALLOC_H -DHAVE_MMXEXT -DHAVE_SSE2 -DARCH_X86 -DSYS_LINUX -DVISUALIZE=1 -I/x/include -L/x/lib -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:171: error: 'cpu_set_t' undeclared (first use in this function)
common/cpu.c:171: error: (Each undeclared identifier is reported only once
common/cpu.c:171: error: for each function it appears in.)
common/cpu.c:171: error: expected ';' before 'p_aff'
common/cpu.c:172: error: 'p_aff' undeclared (first use in this function)
common/cpu.c:173: warning: implicit declaration of function 'sched_getaffinity'
make: *** [common/cpu.o] Error 1

After making the dirty hack in common/cpu.c:

/* #elif defined(SYS_LINUX)
    unsigned int bit;
    int np;
    cpu_set_t p_aff;
    memset( &p_aff, 0, sizeof(p_aff) );
    sched_getaffinity( 0, sizeof(p_aff), &p_aff );
    for( np = 0, bit = 0; bit < sizeof(p_aff); bit++ )
        np += (((uint8_t *)&p_aff)[bit / 8] >> (bit % 8)) & 1;
    return np; */

it compiles fine.

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list