Have simple , empty project without any code. just includes.
The include linux/netfilter.h cause to compilation error:
In file included from ../src/main.cpp:2:0:
/usr/include/linux/netfilter.h:65:17: error: field ‘in’ has incomplete type
/usr/include/linux/netfilter.h:66:18: error: field ‘in6’ has incomplete type
As you can see in the simple project i have 2 includes if i remove the iostream include i will get additional error – ‘/usr/include/linux/sysctl.h:40:2: error: ‘size_t’ does not name a type’
#include <iostream>
#include <linux/netfilter.h>
int main() {
}
if i add include of netinet/in.h before netfilter.h than no errors.
why my simple main program cannot has these compilation errors?
Thank you
struct in_addrandin6_addrare not complete types. so, you should include header with declaration of structures beforenetfilter.h