FS#10728 - netfilter*.h from kernel-headers are broken
Attached to Project:
Arch Linux
Opened by Denis Martinez (denis) - Sunday, 22 June 2008, 16:50 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 16 August 2008, 15:02 GMT
Opened by Denis Martinez (denis) - Sunday, 22 June 2008, 16:50 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 16 August 2008, 15:02 GMT
|
Details
It is impossible to compile code which depends on the
netfilter headers (libnetfilter_queue, moblock from AUR),
because apparently some type definitions were stripped from
the original linux headers.
Test case: #include <linux/netfilter.h> int main() {} which gives: /usr/include/linux/netfilter.h:40: error: expected specifier-qualifier-list before ‘__u32’ link: http://lkml.org/lkml/2008/5/20/446 Temporary solution: I was able to compile by commenting out blocks of code from netfilter.h and netfilter_ipv4.h. |
This task depends upon
Here is the moblock compile error for reference:
gcc -Wall -O2 -march=i586 -mtune=i686 -fomit-frame-pointer -ffast-math -D_GNU_SOURCE -DNFQUEUE -L/usr/include/libipq -c -o MoBlock.o MoBlock.c
In file included from /usr/include/linux/netfilter_ipv4.h:8,
from MoBlock.c:35:
/usr/include/linux/netfilter.h:40: error: expected specifier-qualifier-list before ‘__u32’
In file included from MoBlock.c:35:
/usr/include/linux/netfilter_ipv4.h:53: error: ‘INT_MIN’ undeclared here (not in a function)
/usr/include/linux/netfilter_ipv4.h:63: error: ‘INT_MAX’ undeclared here (not in a function)
make: *** [MoBlock.o] Error 1
gcc -Wall -O2 -march=i586 -mtune=i686 -fomit-frame-pointer -ffast-math -D_GNU_SOURCE -DNFQUEUE -L/usr/include/libipq -c -o MoBlock.o MoBlock.c
In file included from MoBlock.c:35:
/usr/include/linux/netfilter_ipv4.h:53: error: ?INT_MIN? undeclared here (not in a function)
/usr/include/linux/netfilter_ipv4.h:63: error: ?INT_MAX? undeclared here (not in a function)
make: *** [MoBlock.o] Error 1
libnetfilter_queue.c:437: error: conflicting types for 'nfq_get_physindev_name'
../include/libnetfilter_queue/libnetfilter_queue.h:89: error: previous declaration of 'nfq_get_physindev_name' was here
libnetfilter_queue.c:445: warning: 'struct nlif_handle' declared inside parameter list
libnetfilter_queue.c:444: error: conflicting types for 'nfq_get_outdev_name'
../include/libnetfilter_queue/libnetfilter_queue.h:91: error: previous declaration of 'nfq_get_outdev_name' was here
libnetfilter_queue.c:452: warning: 'struct nlif_handle' declared inside parameter list
libnetfilter_queue.c:451: error: conflicting types for 'nfq_get_physoutdev_name'
../include/libnetfilter_queue/libnetfilter_queue.h:93: error: previous declaration of 'nfq_get_physoutdev_name' was here
make[1]: *** [libnetfilter_queue.lo] Error 1
make[1]: Leaving directory `/libnetfilter_queue/src/libnetfilter_queue-0.0.16/src'
make: *** [all-recursive] Error 1