http://bugs.winehq.org/show_bug.cgi?id=16931
--- Comment #3 from Austin English austinenglish@gmail.com 2009-01-28 10:05:00 --- The includes should be fixed now on FreeBSD/NetBSD/OpenBSD.
On NetBSD/OpenBSD, problems still remain because of incomplete/broken headers: ipstats.c:326: error: 'struct icmpstat' has no member named 'icps_outhist' ... ipstats.c:907: error: invalid application of 'sizeof' to incomplete type 'struct xinpgen' ... ipstats.c:941: error: 'struct inpcb' has no member named 'inp_gencnt' ... ipstats.c:945: error: 'struct inpcb' has no member named 'inp_vflag' ... ipstats.c:945: error: 'INP_IPV4' undeclared (first use in this function) ... ipstats.c:946: error: 'INP_IPV6' undeclared (first use in this function)
The icps_outhist errors I tried fixing by using 'ifndef icps_outhist...', but that didn't work. Replacing the NetBSD headers with the FreeBSD headers got things a bit further, then failed because of missing includes.
I asked Juan (original author of the code), and he replied with this help:
ipstats.c:326: error: 'struct icmpstat' has no member named 'icps_outhist'
For this one, you'll want to check whether struct icmpstat has the icps_outhist member or not. AC_CHECK_MEMBERS is the appropriate configure.ac check.
ipstats.c:907: error: invalid application of 'sizeof' to incomplete type 'struct xinpgen'
That needs a configure check too, probably AC_CHECK_TYPE. The #ifdef before it should be changed to HAVE_XINPGEN or whatever it is that gets defined by the configure check.
ipstats.c:941: error: 'struct inpcb' has no member named 'inp_gencnt' ipstats.c:945: error: 'struct inpcb' has no member named 'inp_vflag'
These also need a AC_CHECK_MEMBERS configure check.
ipstats.c:945: error: 'INP_IPV4' undeclared (first use in this function) ipstats.c:946: error: 'INP_IPV6' undeclared (first use in this function)
These two should disappear if you don't access the code unless struct inpcb has a inp_vflag member.
So now, I'm working on updating configure.ac for these struct checks.