On Tue, May 21, 2013 at 10:38 PM, Stuart Henderson <s...@spacehopper.org> wrote:
> On 2013-05-21, C. L. Martinez <carlopm...@gmail.com> wrote:
>> Hi all,
>>
>>  I am trying to compile vortex-ids
>> (http://sourceforge.net/projects/vortex-ids/?source=directory) under
>> OpenBSD 5.3, but this error is returned:
>>
>> vortex.c: In function 'errors_thread':
>> vortex.c:686: error: '__NR_gettid' undeclared (first use in this function)
>> vortex.c:686: error: (Each undeclared identifier is reported only once
>> vortex.c:686: error: for each function it appears in.)
>> vortex.c:693: error: 'cpu_set_t' undeclared (first use in this function)
>> vortex.c:693: error: expected ';' before 'csmask'
>> vortex.c:694: error: 'csmask' undeclared (first use in this function)
>> vortex.c: In function 'stats_thread':
>> vortex.c:768: error: '__NR_gettid' undeclared (first use in this function)
>> vortex.c:776: error: 'cpu_set_t' undeclared (first use in this function)
>> vortex.c:776: error: expected ';' before 'csmask'
>> vortex.c:777: error: 'csmask' undeclared (first use in this function)
>> vortex.c: In function 'conn_writer':
>> vortex.c:950: error: '__NR_gettid' undeclared (first use in this function)
>> vortex.c:958: error: 'cpu_set_t' undeclared (first use in this function)
>> vortex.c:958: error: expected ';' before 'csmask'
>> vortex.c:959: error: 'csmask' undeclared (first use in this function)
>> vortex.c: In function 'main':
>> vortex.c:1917: error: '__NR_gettid' undeclared (first use in this function)
>> vortex.c:1925: error: 'cpu_set_t' undeclared (first use in this function)
>> vortex.c:1925: error: expected ';' before 'csmask'
>> vortex.c:1926: error: 'csmask' undeclared (first use in this function)
>>
>> I have installed libnet-1.1.2.1p0, glib2-2.34.3 and libnids-1.24 packages.
>>
>> Compile options are:
>>
>> gcc -I/usr/local/include -I/data/soft/libpcap/include -L/usr/local/lib
>> -L/data/soft/libpcap/lib -O3 vortex.c -o vortex -lnids -lnet
>> -lgthread-2.0 -lpcap
>>
>> I have tried with this modified version also:
>>
>> https://github.com/ckane/vortex-dev
>>
>>  ... but without luck.
>>
>> Any idea??
>>
>>
>
> This is trying to use non-portable Linux code (from the errors it
> looks like it maybe for processor affinity).
>
> The modified version you mention has some if defined(__FreeBSD__)
> hacks, you may get it to compile if you change those lines to
> if defined(__FreeBSD__) || defined(__OpenBSD__).
>

Uhmm I have tried, but same errors:

root@plzfnsm01:/tmp/1/vortex-dev-master# gcc -c vortex.c
-I/usr/local/include -I/data/soft/libpcap/include
vortex.c:44:24: error: sys/cpuset.h: No such file or directory
vortex.c:45: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'cpu_set_t'
vortex.c:47:1: warning: "SIZE_MAX" redefined
In file included from /usr/include/sys/limits.h:34,
                 from /usr/include/sys/param.h:92,
                 from vortex.c:43:
/usr/include/machine/limits.h:41:1: warning: this is the location of
the previous definition
vortex.c: In function 'errors_thread':
vortex.c:676: error: 'cpu_set_t' undeclared (first use in this function)
vortex.c:676: error: (Each undeclared identifier is reported only once
vortex.c:676: error: for each function it appears in.)
vortex.c:676: error: expected ';' before 'csmask'
vortex.c:677: error: 'csmask' undeclared (first use in this function)
vortex.c: In function 'stats_thread':
vortex.c:756: error: 'cpu_set_t' undeclared (first use in this function)
vortex.c:756: error: expected ';' before 'csmask'
vortex.c:757: error: 'csmask' undeclared (first use in this function)
vortex.c: In function 'conn_writer':
vortex.c:936: error: 'cpu_set_t' undeclared (first use in this function)
vortex.c:936: error: expected ';' before 'csmask'
vortex.c:937: error: 'csmask' undeclared (first use in this function)
vortex.c: In function 'main':
vortex.c:1870: error: 'cpu_set_t' undeclared (first use in this function)
vortex.c:1870: error: expected ';' before 'csmask'
vortex.c:1871: error: 'csmask' undeclared (first use in this function)

cpuset.h and cpu_set_t function doesn't exists in OpenBSD, right??

Reply via email to