参考:http://blog.csdn.net/qq236106303/article/details/7613352
In file included from /home/wei/work/arm-2008q3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/netfilter_ipv4.h:8,from ipsvd/tcpudp.c:33:
/home/wei/work/arm-2008q3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/netfilter.h:44: error: field 'in' has incomplete type
/home/wei/work/arm-2008q3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/netfilter.h:45: error: field 'in6' has incomplete type
ipsvd/tcpudp.c: In function 'tcpudpsvd_main':
ipsvd/tcpudp.c:314: warning: ignoring return value of 'write', declared with attribute warn_unused_result
make[1]: *** [ipsvd/tcpudp.o] 错误 1
make: *** [ipsvd] 错误 2
我们下载的交叉编译库中有个头文件中的 in 及 in6 类型不对
解决办法:
在 .../arm-none-linux-gnueabi/libc/usr/include/linux/netfilter.h 的开头
添加缺少的头文件:
#include <netinet/in.h>