2014-08-28 03:39, Wu, Jingjing: > Because these macros such as IPPROTO_TCP, IPPROTO_UDP are already > defined in <netinet/in.h>. If user's application include <netinet/in.h> > and rte_ip.h at the same time, there will be conflict error, for > example cmdline.c in testpmd.
Yes > I remember there was someone also raised this issue few month ago. Yes, and the question was: "should we totally remove these definitions"? I think yes. > So just use the way "#ifndef #endif" to avoid the conflict. But you didn't explain difference between _NETINET_IN_H and _NETINET_IN_H_. > And it is exactly workaround as you said. Yes, it's a workaround. If rte_ip.h is included before netinet/in.h, I think there is still a problem. -- Thomas