libnfnetlink.h include generates problems...
in one of my programs, i include the following two files:
#include <linux/netfilter.h>
#include <libnetfilter_queue/libnetfilter_queue.h>
while a few of my header files include each other i get errors from these nfqueue header:
In file included from /usr/include/sys/uio.h:24,
from /usr/include/sys/socket.h:27,
from /usr/local/include/libnfnetlink/libnfnetlink.h:19,
from
/usr/local/include/libnetfilter_queue/libnetfilter_queue.h:16,
from misc.h:14,
from packeter.c:9:/usr/include/sys/types.h:62: error: conflicting types for 'dev_t' /usr/include/linux/types.h:27: error: previous declaration of 'dev_t' was here/usr/include/sys/types.h:72: error: conflicting types for 'mode_t' /usr/include/linux/types.h:33: error: previous declaration of 'mode_t' was here/usr/include/sys/types.h:77: error: conflicting types for 'nlink_t' /usr/include/linux/types.h:36: error: previous declaration of 'nlink_t' was here
etc. etc.
i talked to some guys from ##c on freenode, and they said, probably libnfnetlink.h should not directly include linux/types.h
sorry if this is my mistake, i am not very good at this stuff
greetings, aton
Hi,
Quoted 8 lines · aton
in one of my programs, i include the following two files:
#include <
linux/netfilter.h>
#include <libnetfilter_queue/libnetfilter_queue.h>while a few of my header files include each other i get errors from these nfqueue header:
Quoted 7 lines
In file included from
/usr/include/sys/uio.h:24,/usr/include/sys/types.h:62: error: conflicting types for 'dev_t'/usr/include/linux/types.h:27: error: previous declaration of 'dev_t' was herei talked to some guys from ##c on freenode, and they said, probably
libnfnetlink.hshould not directly includelinux/types.h
This seems to be the case as we discus on #netfilter. I'm sending two patches which fix this issue.
BR,
Signature · 2 lines
Eric Leblond <[email protected]> INL
Hi,
Here's the patch for libnfnetlink.
BR,
Signature · 2 lines
Eric Leblond <[email protected]> INL
libnfnetlink/libnfnetlink.h +0 -1
@@ -16,7 +16,6 @@#endif #include <sys/socket.h> /* for sa_family_t */ -#include <linux/types.h> #include <linux/netlink.h> #include <libnfnetlink/linux_nfnetlink.h>
Pablo Neira Ayuso
maintainerQuoted 1 line · Eric Leblond
Here's the patch for libnfnetlink.
Both applied. Thanks Eric.
Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
Hi,
Here's the patch for libnetilter_queue.
BR,
Signature · 2 lines
Eric Leblond <[email protected]> INL
libnetfilter_queue/linux_nfnetlink_queue.h +0 -1
@@ -5,7 +5,6 @@#define aligned_u64 unsigned long long __attribute__((aligned(8)))#endif -#include <linux/types.h> #include <libnfnetlink/linux_nfnetlink.h> enum nfqnl_msg_types {
Pablo Neira Ayuso
maintainerQuoted 26 lines · aton
in one of my programs, i include the following two files:
#include <
linux/netfilter.h>
#include <libnetfilter_queue/libnetfilter_queue.h>while a few of my header files include each other i get errors from these nfqueue header:
In file included from
/usr/include/sys/uio.h:24,from /usr/include/sys/socket.h:27, from /usr/local/include/libnfnetlink/libnfnetlink.h:19, from /usr/local/include/libnetfilter_queue/libnetfilter_queue.h:16, from misc.h:14, from packeter.c:9:
/usr/include/sys/types.h:62: error: conflicting types for 'dev_t'/usr/include/linux/types.h:27: error: previous declaration of 'dev_t' was here/usr/include/sys/types.h:72: error: conflicting types for 'mode_t'/usr/include/linux/types.h:33: error: previous declaration of 'mode_t' was here/usr/include/sys/types.h:77: error: conflicting types for 'nlink_t'/usr/include/linux/types.h:36: error: previous declaration of 'nlink_t' was here
etc. etc.
Quoted 2 lines
i talked to some guys from ##c on freenode, and they said, probably
libnfnetlink.hshould not directly includelinux/types.h
What version of libnfnetlink are you using? This problem is supposed to be fixed already in 0.0.25.
Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
Quoted 27 lines · Pablo Neira Ayuso
Quoted 26 lines · aton
in one of my programs, i include the following two files:
#include <
linux/netfilter.h>
#include <libnetfilter_queue/libnetfilter_queue.h>while a few of my header files include each other i get errors from these nfqueue header:
In file included from
/usr/include/sys/uio.h:24,from /usr/include/sys/socket.h:27, from /usr/local/include/libnfnetlink/libnfnetlink.h:19, from /usr/local/include/libnetfilter_queue/libnetfilter_queue.h:16, from misc.h:14, from packeter.c:9:
/usr/include/sys/types.h:62: error: conflicting types for 'dev_t'/usr/include/linux/types.h:27: error: previous declaration of 'dev_t' was here/usr/include/sys/types.h:72: error: conflicting types for 'mode_t'/usr/include/linux/types.h:33: error: previous declaration of 'mode_t' was here/usr/include/sys/types.h:77: error: conflicting types for 'nlink_t'/usr/include/linux/types.h:36: error: previous declaration of 'nlink_t' was here
etc. etc.
Quoted 6 lines
Quoted 2 lines
i talked to some guys from ##c on freenode, and they said, probably
libnfnetlink.hshould not directly includelinux/types.hWhat version of libnfnetlink are you using? This problem is supposed to be fixed already in 0.0.25.
i am using libnfnetlink-0.0.25 and libnetfilter_queue-0.0.13. i compiled it myself and did not use the packaged version of the gentoo portage system
Pablo Neira Ayuso
maintainerQuoted 28 lines · aton
Quoted 27 lines · Pablo Neira Ayuso
Quoted 26 lines · aton
in one of my programs, i include the following two files:
#include <
linux/netfilter.h>
#include <libnetfilter_queue/libnetfilter_queue.h>while a few of my header files include each other i get errors from these nfqueue header:
In file included from
/usr/include/sys/uio.h:24,from /usr/include/sys/socket.h:27, from /usr/local/include/libnfnetlink/libnfnetlink.h:19, from /usr/local/include/libnetfilter_queue/libnetfilter_queue.h:16, from misc.h:14, from packeter.c:9:
/usr/include/sys/types.h:62: error: conflicting types for 'dev_t'/usr/include/linux/types.h:27: error: previous declaration of 'dev_t' was here/usr/include/sys/types.h:72: error: conflicting types for 'mode_t'/usr/include/linux/types.h:33: error: previous declaration of 'mode_t' was here/usr/include/sys/types.h:77: error: conflicting types for 'nlink_t'/usr/include/linux/types.h:36: error: previous declaration of 'nlink_t' was here
etc. etc.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
i talked to some guys from ##c on freenode, and they said, probably
libnfnetlink.hshould not directly includelinux/types.hWhat version of libnfnetlink are you using? This problem is supposed to be fixed already in 0.0.25.
i am using libnfnetlink-0.0.25 and libnetfilter_queue-0.0.13. i compiled it myself and did not use the packaged version of the gentoo portage system
ACK. I'll apply Eric's patches asap.
Signature · 1 line
The dawn of the fourth age of Linux firewalling is coming; a time of great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris