Netinet / in. H Linux / in. H problem

* IPv6hdr struct * IPv6hdr struct * IPv6hdr struct * IPv6hdr struct * IPv6hdr struct * IPv6hdr struct * IPv6hdr struct * IPv6hdr struct * IPv6hdr struct
It is assumed that it directly includes <; linux/ipv6.h> Result compilation error, duplicate definition The problem is that the project uses the libnetfilter_conntrack.h connection trace header, This file contains <<; netinet/in.h> , while IPv6.h contains <; linux/in.h> Both files basically define the same thing Linux is for the kernel and Netinet is for user space, so in user space I call <; netinet/ipv6.h> This file contains Netinet. h so there is no problem.


Read More: